mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 20:54:29 +00:00
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. Fixes #47489. git-svn-id: https://develop.svn.wordpress.org/trunk@45569 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3230,7 +3230,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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user