Make WordPress Core

Ticket #31242: 31242.17.patch

File 31242.17.patch, 910 bytes (added by iseulde, 10 years ago)
  • src/wp-includes/js/wp-emoji.js

     
    102102                        }
    103103
    104104                        /*
    105                          * Chrome OS X added native emoji rendering in M41. Unfortunately,
     105                         * Chrome on OS X added native emoji rendering in M41. Unfortunately,
    106106                         * it doesn't work when the font is bolder than 500 weight. So, we
    107107                         * check for bold rendering support to avoid invisible emoji in Chrome.
    108108                         */
     
    174174                                                        return false;
    175175                                        }
    176176
    177                                         if ( emoji.parseFlags && ! emoji.parseAllEmoji && ! icon.match( /^1f1(e[6-9a-f]|f[1-9a-f])-1f1(e[6-9a-f]|f[1-9a-f])$/ ) ) {
     177                                        if (
     178                                                emoji.parseFlags && ! emoji.parseAllEmoji &&
     179                                                ! /^1f1(?:e[6-9a-f]|f[1-9a-f])-1f1(?:e[6-9a-f]|f[1-9a-f])$/.test( icon )
     180                                        ) {
    178181                                                return false;
    179182                                        }
    180183