equal
deleted
inserted
replaced
2134 $html = preg_replace('/<(script|iframe)(.+?)src=([^>]*)</i', '<\\1\\2src=\\3<', $html); |
2134 $html = preg_replace('/<(script|iframe)(.+?)src=([^>]*)</i', '<\\1\\2src=\\3<', $html); |
2135 |
2135 |
2136 // Vulnerability reported by fuzion from nukeit.org: |
2136 // Vulnerability reported by fuzion from nukeit.org: |
2137 // XSS in closing HTML tag style attribute |
2137 // XSS in closing HTML tag style attribute |
2138 // Fix: escape all closing tags with non-whitelisted characters |
2138 // Fix: escape all closing tags with non-whitelisted characters |
2139 $html = preg_replace('!</((?:.*)([^a-z0-9-_:]+)(?:.*))>!i', '</\\1>', $html); |
2139 $html = preg_replace('!</((?:[^>]*)([^a-z0-9_:>-]+)(?:[^>]*))>!i', '</\\1>', $html); |
2140 |
2140 |
2141 // Restore stripped comments |
2141 // Restore stripped comments |
2142 $i = 0; |
2142 $i = 0; |
2143 foreach ( $comment_match[0] as $comment ) |
2143 foreach ( $comment_match[0] as $comment ) |
2144 { |
2144 { |