Changeset 3429
- Timestamp:
- 01/13/2006 07:28:47 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/kses.php
r3418 r3429 78 78 ############################################################################### 79 79 { 80 return preg_replace('%(<!--.*?-->)|(<'.# EITHER: < 81 '[^>]*'.# things that aren't > 82 '(>|$)'.# > or end of string 83 '|>)%e', # OR: just a > 80 return preg_replace('%((<!--.*?(-->|$))|(<[^>]*(>|$)|>))%e', 84 81 "wp_kses_split2('\\1', \$allowed_html, ".'$allowed_protocols)', $string); 85 82 } # function wp_kses_split … … 99 96 # It matched a ">" character 100 97 101 if (preg_match('%^<!--(.* )-->$%', $string, $matches)) {102 $string = $matches[1];98 if (preg_match('%^<!--(.*?)(-->)?$%', $string, $matches)) { 99 $string = str_replace(array('<!--', '-->'), '', $matches[1]); 103 100 while ( $string != $newstring = wp_kses($string, $allowed_html, $allowed_protocols) ) 104 101 $string = $newstring; 102 if ( $string == '' ) 103 return ''; 105 104 return "<!--{$string}-->"; 106 105 }
Note: See TracChangeset
for help on using the changeset viewer.