have a \s

"< text" is not valid HTML so it's not vulnerable to XSS
This commit is contained in:
RanAwaySuccessfully
2018-06-26 22:08:14 -03:00
committed by GitHub
parent 5d368577cb
commit 72e77a943e

View File

@@ -1263,7 +1263,7 @@ function xss_clean($data) {
#$data = preg_replace('#(<[^>]+?[\x00-\x20"\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data);
do {
$old_data = $data;
$data = preg_replace('#(<[^>]+?[\x00-\x20"\'])(on|xmlns)([^>]*+)>#iu', '$1DISABLED_$2$3>', $data);
$data = preg_replace('#(<[^>\s]+?[\x00-\x20"\'])(on|xmlns)([^>]*+)>#iu', '$1DISABLED_$2$3>', $data);
} while ($old_data !== $data);
// Remove javascript: and vbscript: protocols