Make WordPress Core


Ignore:
Timestamp:
08/19/2019 04:23:27 AM (6 years ago)
Author:
SergeyBiryukov
Message:

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.

Location:
branches/5.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.2

  • branches/5.2/src/wp-includes/formatting.php

    r45349 r45837  
    32293229
    32303230            // If we're in an ignore block, wait until we find its closing tag
    3231             if ( '' == $ignore_block_element && preg_match( '/^<(' . $tags_to_ignore . ')>/', $content, $matches ) ) {
     3231            if ( '' == $ignore_block_element && preg_match( '/^<(' . $tags_to_ignore . ')[^>]*>/', $content, $matches ) ) {
    32323232                $ignore_block_element = $matches[1];
    32333233            }
Note: See TracChangeset for help on using the changeset viewer.