X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/607b7e02d77e7326161e8ec15639052d2040f745..16e7b37c7914d753890c1a05a9335f3b43751eb8:/wp-includes/kses.php?ds=inline diff --git a/wp-includes/kses.php b/wp-includes/kses.php index 8be3f79d..4745d8d7 100644 --- a/wp-includes/kses.php +++ b/wp-includes/kses.php @@ -527,7 +527,6 @@ function wp_kses( $string, $allowed_html, $allowed_protocols = array() ) { if ( empty( $allowed_protocols ) ) $allowed_protocols = wp_allowed_protocols(); $string = wp_kses_no_null( $string, array( 'slash_zero' => 'keep' ) ); - $string = wp_kses_js_entities($string); $string = wp_kses_normalize_entities($string); $string = wp_kses_hook($string, $allowed_html, $allowed_protocols); // WP changed the order of these funcs and added args to wp_kses_hook return wp_kses_split($string, $allowed_html, $allowed_protocols); @@ -550,7 +549,6 @@ function wp_kses_one_attr( $string, $element ) { $allowed_html = wp_kses_allowed_html( 'post' ); $allowed_protocols = wp_allowed_protocols(); $string = wp_kses_no_null( $string, array( 'slash_zero' => 'keep' ) ); - $string = wp_kses_js_entities( $string ); // Preserve leading and trailing whitespace. $matches = array(); @@ -781,7 +779,7 @@ function wp_kses_split2($string, $allowed_html, $allowed_protocols) { } // Allow HTML comments - if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9]+)([^>]*)>?$%', $string, $matches)) + if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9-]+)([^>]*)>?$%', $string, $matches)) return ''; // It's seriously malformed @@ -1295,18 +1293,6 @@ function wp_kses_array_lc($inarray) { return $outarray; } -/** - * Removes the HTML JavaScript entities found in early versions of Netscape 4. - * - * @since 1.0.0 - * - * @param string $string - * @return string - */ -function wp_kses_js_entities($string) { - return preg_replace('%&\s*\{[^}]*(\}\s*;?|$)%', '', $string); -} - /** * Handles parsing errors in wp_kses_hair(). *