Merge pull request #62 from RanAwaySuccessfully/patch-1

more HTML filter fixes
This commit is contained in:
Xkeeper 2019-01-11 11:23:31 -08:00 committed by GitHub
commit 4abe5122bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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