mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-28 15:17:42 +02:00
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. Merge of [36036] to the 4.4 branch. Fixes #35008. Built from https://develop.svn.wordpress.org/branches/4.4@36037 git-svn-id: http://core.svn.wordpress.org/branches/4.4@36002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9510566056
commit
b702c2f95b
@ -233,6 +233,10 @@ function wptexturize( $text, $reset = false ) {
|
|||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
// This is an HTML element delimiter.
|
// 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 );
|
_wptexturize_pushpop_element( $curl, $no_texturize_tags_stack, $no_texturize_tags );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4.1-alpha-36035';
|
$wp_version = '4.4.1-alpha-36037';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user