mirror of
https://github.com/WordPress/WordPress.git
synced 2024-06-26 06:45:07 +02:00
Rerun comment text back through kses.
git-svn-id: http://svn.automattic.com/wordpress/trunk@3418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ea84ce4551
commit
107326dcd9
|
@ -98,8 +98,12 @@ function wp_kses_split2($string, $allowed_html, $allowed_protocols)
|
||||||
return '>';
|
return '>';
|
||||||
# It matched a ">" character
|
# It matched a ">" character
|
||||||
|
|
||||||
if (preg_match('%^<!--.*-->$%', $string))
|
if (preg_match('%^<!--(.*)-->$%', $string, $matches)) {
|
||||||
return $string;
|
$string = $matches[1];
|
||||||
|
while ( $string != $newstring = wp_kses($string, $allowed_html, $allowed_protocols) )
|
||||||
|
$string = $newstring;
|
||||||
|
return "<!--{$string}-->";
|
||||||
|
}
|
||||||
# Allow HTML comments
|
# Allow HTML comments
|
||||||
|
|
||||||
if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9]+)([^>]*)>?$%', $string, $matches))
|
if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9]+)([^>]*)>?$%', $string, $matches))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user