From 397404140588ed6bffe13d62fad28993d0fbbd14 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 10 Jan 2006 01:27:36 +0000 Subject: [PATCH] Rerun comment text back through kses. git-svn-id: https://develop.svn.wordpress.org/trunk@3418 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/kses.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-includes/kses.php b/wp-includes/kses.php index bc9d5141e5..a662b2e833 100644 --- a/wp-includes/kses.php +++ b/wp-includes/kses.php @@ -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 ""; + } # Allow HTML comments if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9]+)([^>]*)>?$%', $string, $matches))