X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/2376fb745f4ae8c6bd2353127524e0b28005143d..fef8173b8c3bad08f495551e43cfdeac1cae6021:/wp-includes/kses.php diff --git a/wp-includes/kses.php b/wp-includes/kses.php index 792b15e7..aea7aa81 100644 --- a/wp-includes/kses.php +++ b/wp-includes/kses.php @@ -1,26 +1,34 @@ + * @author Ulf Harnhammar * * @package External * @subpackage KSES * - * @internal - * *** CONTACT INFORMATION *** - * E-mail: metaur at users dot sourceforge dot net - * Web page: http://sourceforge.net/projects/kses - * Paper mail: Ulf Harnhammar - * Ymergatan 17 C - * 753 25 Uppsala - * SWEDEN - * - * [kses strips evil scripts!] */ /** @@ -546,8 +554,18 @@ function wp_kses_split($string, $allowed_html, $allowed_protocols) { global $pass_allowed_html, $pass_allowed_protocols; $pass_allowed_html = $allowed_html; $pass_allowed_protocols = $allowed_protocols; - return preg_replace_callback('%((|$))|(<[^>]*(>|$)|>))%', - create_function('$match', 'global $pass_allowed_html, $pass_allowed_protocols; return wp_kses_split2($match[1], $pass_allowed_html, $pass_allowed_protocols);'), $string); + return preg_replace_callback( '%((|$))|(<[^>]*(>|$)|>))%', '_wp_kses_split_callback', $string ); +} + +/** + * Callback for wp_kses_split. + * + * @since 3.1.0 + * @access private + */ +function _wp_kses_split_callback( $match ) { + global $pass_allowed_html, $pass_allowed_protocols; + return wp_kses_split2( $match[1], $pass_allowed_html, $pass_allowed_protocols ); } /**