Rerun comment text back through kses.

git-svn-id: https://develop.svn.wordpress.org/trunk@3418 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2006-01-10 01:27:36 +00:00
parent 06532a3304
commit 3974041405
1 changed files with 6 additions and 2 deletions

View File

@ -98,8 +98,12 @@ function wp_kses_split2($string, $allowed_html, $allowed_protocols)
return '>';
# It matched a ">" character
if (preg_match('%^<!--.*-->$%', $string))
return $string;
if (preg_match('%^<!--(.*)-->$%', $string, $matches)) {
$string = $matches[1];
while ( $string != $newstring = wp_kses($string, $allowed_html, $allowed_protocols) )
$string = $newstring;
return "<!--{$string}-->";
}
# Allow HTML comments
if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9]+)([^>]*)>?$%', $string, $matches))