Open ken678 opened 11 months ago
$harm_string = "Hello, i try to <script>alert('Hack');</script> your site"; $harmless_string = $antiXss->xss_clean($harm_string); // Hello, i try to your site
$harm_string = "<IMG SRC=javascript:alert('XSS')>"; $harmless_string = $antiXss->xss_clean($harm_string); //
$harm_string = "<a href=' javascript:alert(1)'>CLICK</a>"; $harmless_string = $antiXss->xss_clean($harm_string); // <a href=' (1)'>CLICK</a>
$harm_string = "<a href=\"\u0001java\u0003script:alert(1)\">CLICK<a>"; $harmless_string = $antiXss->xss_clean($harm_string); // <a href=' (1)'>CLICK</a>