Formatting: Don't convert smilies in ignored tags that have attributes.

Smilies in ignored tags are not supposed to be converted to emoji, but this can malfunction if the tag has attributes. For example, the Preformatted block with add a `class` to the `<pre>` tag.

Props pento, jikamens.
Merges [45569] to the 5.2 branch.
Fixes #47489.
Built from https://develop.svn.wordpress.org/branches/5.2@45837


git-svn-id: http://core.svn.wordpress.org/branches/5.2@45648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-08-19 04:24:53 +00:00
parent 303034e393
commit e256b2897b
2 changed files with 2 additions and 2 deletions

View File

@ -3228,7 +3228,7 @@ function convert_smilies( $text ) {
$content = $textarr[ $i ];
// If we're in an ignore block, wait until we find its closing tag
if ( '' == $ignore_block_element && preg_match( '/^<(' . $tags_to_ignore . ')>/', $content, $matches ) ) {
if ( '' == $ignore_block_element && preg_match( '/^<(' . $tags_to_ignore . ')[^>]*>/', $content, $matches ) ) {
$ignore_block_element = $matches[1];
}

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.2.3-alpha-45836';
$wp_version = '5.2.3-alpha-45837';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.