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
This commit is contained in:
ryan 2011-10-01 15:54:52 +00:00
parent a7a8d9e3e3
commit 8e8847e303
1 changed files with 2 additions and 1 deletions

View File

@ -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);