• My understanding is that you should be able to add the (CSS) class wp-exclude-emoji to any HTML element to prevent any descendant text nodes being converted to an emoji.

    However this doesn’t seem to be working. I’m testing on 4.3 with 2015 theme and no plugins.

    With the following post content: https://pastebin.com/28Hi5n91 only the text added by a JS timeout is not converted to an emoji.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m running into a same/similar issue.

    wp-exclude-emoji does not appear to work.

    There’s 3rd party JS added to the page and it’s building some markup and injecting it into the page. wp-emoji appears to be converting that markup/content into emoji <img> nodes for whatever reason (in latest Chrome stable worst of all).

    Markup generated by 3rd party js is:

    '<span class="wp-exclude-emoji" id="' + this.options.closeid + '" style="' + style + '">?</span>'

    When wp-emoji is disabled by doing:

    remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
    remove_action( 'wp_print_styles', 'print_emoji_styles' );

    then no <img class="emoji"...> replacements happen.

    Related: https://github.com/Automattic/jetpack/issues/2208 — wp-exclude-emoji doesn’t work there either (issue is closed, not sure what/how it’s resolved [if at all])

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding class wp-exclude-emoji does not prevent text being converted to emoji’ is closed to new replies.