WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/27/2019 02:04:17 AM (17 months 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/tests/phpunit/tests/formatting/Smilies.php

    r42343 r45569  
    147147        $includes_path = includes_url( 'images/smilies/' );
    148148
    149         $in_str  = 'Do we ingore smilies ;-) in ' . $element . ' tags <' . $element . '>My Content Here :?: </' . $element . '>';
    150         $exp_str = "Do we ingore smilies \xf0\x9f\x98\x89 in $element tags <$element>My Content Here :?: </$element>";
     149        $in_str  = 'Do we ingore smilies ;-) in ' . $element . ' tags <' . $element . ' class="foo">My Content Here :?: </' . $element . '>';
     150        $exp_str = "Do we ingore smilies \xf0\x9f\x98\x89 in $element tags <$element class=\"foo\">My Content Here :?: </$element>";
    151151
    152152        // standard smilies, use_smilies: ON
Note: See TracChangeset for help on using the changeset viewer.