diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
index a76a4927b7..334806b9e0 100644
a
|
b
|
function convert_smilies( $text ) { |
3230 | 3230 | $content = $textarr[ $i ]; |
3231 | 3231 | |
3232 | 3232 | // 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 ) ) { |
3234 | 3234 | $ignore_block_element = $matches[1]; |
3235 | 3235 | } |
3236 | 3236 | |
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 { |
146 | 146 | public function test_ignore_smilies_in_tags( $element ) { |
147 | 147 | $includes_path = includes_url( 'images/smilies/' ); |
148 | 148 | |
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>"; |
151 | 151 | |
152 | 152 | // standard smilies, use_smilies: ON |
153 | 153 | update_option( 'use_smilies', 1 ); |