From 3985ff6af3f199f61f822a94e3d3b632ad25ce07 Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@18856 602fd350-edb4-49c9-b593-d223f7449a82 --- 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);