WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/27/2019 02:04:17 AM (2 years ago)
Author:
pento
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.
Fixes #47489.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

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