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
This commit is contained in:
Ryan Boren 2011-10-01 15:54:52 +00:00
parent 46f95eb2de
commit 3985ff6af3
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);