From 8e8847e3038aba20a0c4eac4fc1885d60e31da3a Mon Sep 17 00:00:00 2001 From: ryan Date: Sat, 1 Oct 2011 15:54:52 +0000 Subject: [PATCH] Don't use wp_parse_args() on non associative array. Props SergeyBiryukov. see #18268 git-svn-id: http://svn.automattic.com/wordpress/trunk@18856 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/kses.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/kses.php b/wp-includes/kses.php index d381cf3758..d76b34482b 100644 --- a/wp-includes/kses.php +++ b/wp-includes/kses.php @@ -500,7 +500,8 @@ if ( ! CUSTOM_TAGS ) { * @return string Filtered content with only allowed HTML elements */ function wp_kses($string, $allowed_html, $allowed_protocols = array ()) { - $allowed_protocols = wp_parse_args( $allowed_protocols, wp_allowed_protocols() ); + if ( empty( $allowed_protocols ) ) + $allowed_protocols = wp_allowed_protocols(); $string = wp_kses_no_null($string); $string = wp_kses_js_entities($string); $string = wp_kses_normalize_entities($string);