Make WordPress Core

Ticket #47489: 47489.diff

File 47489.diff, 1.6 KB (added by pento, 6 years ago)
  • src/wp-includes/formatting.php

    diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
    index a76a4927b7..334806b9e0 100644
    a b function convert_smilies( $text ) { 
    32303230                        $content = $textarr[ $i ];
    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                        }
    32363236
  • tests/phpunit/tests/formatting/Smilies.php

    diff --git a/tests/phpunit/tests/formatting/Smilies.php b/tests/phpunit/tests/formatting/Smilies.php
    index d1fd3af1a5..662de0b4f6 100644
    a b class Tests_Formatting_Smilies extends WP_UnitTestCase { 
    146146        public function test_ignore_smilies_in_tags( $element ) {
    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
    153153                update_option( 'use_smilies', 1 );