KSES: Optimize PCRE pattern detecting numeric character references.
Props dmsnell, xknown, johnbillion. Built from https://develop.svn.wordpress.org/trunk@61882 git-svn-id: http://core.svn.wordpress.org/trunk@61164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -2118,8 +2118,8 @@ function wp_kses_normalize_entities( $content, $context = 'html' ) {
|
||||
*
|
||||
* Here, each input is normalized to an appropriate output.
|
||||
*/
|
||||
$content = preg_replace_callback( '/&#(0*[0-9]{1,7});/', 'wp_kses_normalize_entities2', $content );
|
||||
$content = preg_replace_callback( '/&#[Xx](0*[0-9A-Fa-f]{1,6});/', 'wp_kses_normalize_entities3', $content );
|
||||
$content = preg_replace_callback( '/&#(0*[1-9][0-9]{0,6});/', 'wp_kses_normalize_entities2', $content );
|
||||
$content = preg_replace_callback( '/&#[Xx](0*[1-9A-Fa-f][0-9A-Fa-f]{0,5});/', 'wp_kses_normalize_entities3', $content );
|
||||
if ( 'xml' === $context ) {
|
||||
$content = preg_replace_callback( '/&([A-Za-z]{2,8}[0-9]{0,2});/', 'wp_kses_xml_named_entities', $content );
|
||||
} else {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '7.0-beta3-61881';
|
||||
$wp_version = '7.0-beta3-61882';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
||||
Reference in New Issue
Block a user