code_junkie

HTML Data exceeds field length after being hex-sanitized

Nov 11th, 2011
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. $string = 'javascript:alert("hello!");';
  2. echo strlen($string);
  3. // outputs 27
  4. $escaped_string = filter_var('javascript:alert("hello!");', FILTER_SANITIZE_ENCODED);
  5. echo strlen($escaped_string);
  6. // outputs 41
Add Comment
Please, Sign In to add comment