Registry / security / voku-anti-xss

voku-anti-xss

JSON →
library4.1.43phppackagistunverified

Anti XSS library to prevent cross-site scripting attacks.

composer require voku/anti-xss
INSTALL
IMPORT
SIG · VOKU-ANTI-XSS
V
voku-anti-xss
securityphpv4.1.43
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AntiXSS
use voku\helper\AntiXSS;

Sanitize a string to remove XSS vectors.

<?php use voku\helper\AntiXSS; $antiXss = new AntiXSS(); $clean = $antiXss->xss_clean('<script>alert("xss")</script>'); echo $clean; // Outputs: alert("xss")
Debug
Known issues
gotchaNot a silver bullet; always validate and escape output contextually.
fix
Combine with proper output encoding (e.g., htmlspecialchars) for defense in depth.
affects: >=4.0.0
Upgrade
Version history
4.1.43latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
22 hits · last 30 days
node
20
Resources
voku-anti-xss — pip install voku-anti-xss · libregistry