Texturize: Transform `&` into `&` in tag attributes.

[35709] was overly broad, and stopped transforming `&` characters within tag attributes. So that sites aren't generating invalid HTML, we need to restore this functionality, while continuing to not transform `&` within blocked tags.

Fixes #35008 for trunk.


Built from https://develop.svn.wordpress.org/trunk@36036


git-svn-id: http://core.svn.wordpress.org/trunk@36001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2015-12-21 02:43:26 +00:00
parent dbf5d782ad
commit ba8b95cdbe
2 changed files with 5 additions and 1 deletions

View File

@ -233,6 +233,10 @@ function wptexturize( $text, $reset = false ) {
continue;
} else {
// This is an HTML element delimiter.
// Replace each & with & unless it already looks like an entity.
$curl = preg_replace( '/&(?!#(?:\d+|x[a-f0-9]+);|[a-z1-4]{1,8};)/i', '&', $curl );
_wptexturize_pushpop_element( $curl, $no_texturize_tags_stack, $no_texturize_tags );
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.5-alpha-36034';
$wp_version = '4.5-alpha-36036';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.