Ticket #2130: kses.php.2.diff
File kses.php.2.diff, 782 bytes (added by , 19 years ago) |
---|
-
wp-includes/kses.php
77 77 # matches stray ">" characters. 78 78 ############################################################################### 79 79 { 80 return preg_replace('%(< '.# EITHER: <80 return preg_replace('%(<!--.*-->)|(<'.# EITHER: < 81 81 '[^>]*'.# things that aren't > 82 82 '(>|$)'.# > or end of string 83 83 '|>)%e', # OR: just a > … … 98 98 return '>'; 99 99 # It matched a ">" character 100 100 101 if (preg_match('%^<!--.*-->$%', $string)) 102 return $string; 103 # Allow HTML comments 104 101 105 if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9]+)([^>]*)>?$%', $string, $matches)) 102 106 return ''; 103 107 # It's seriously malformed