Make WordPress Core

Ticket #40858: 40858.2.diff

File 40858.2.diff, 1.7 KB (added by peterwilsoncc, 6 years ago)
  • src/wp-includes/js/wp-emoji-loader.js

    diff --git src/wp-includes/js/wp-emoji-loader.js src/wp-includes/js/wp-emoji-loader.js
    index b267e99dcf..169ee89af2 100644
     
    5151                                context.clearRect( 0, 0, canvas.width, canvas.height );
    5252
    5353                                // Add a zero width space between the characters, to force rendering as characters.
    54                                 context.fillText( stringFromCharCode( 55356, 57331, 8203, 55356, 57096 ), 0, 0 );
     54                                context.fillText( stringFromCharCode( 55356, 56826, 8203, 55356, 56819 ), 0, 0 );
    5555                                flag2 = canvas.toDataURL();
    5656
    5757                                if ( flag !== flag2 ) {
     
    7979                                return flag !== flag2;
    8080                        case 'emoji4':
    8181                                /*
    82                                  * Emoji 5 has the bushiest beards. So does WordPress!
     82                                 * Emoji 5 has faries of all genders.
    8383                                 *
    84                                  * To test for support, try to render a new emoji (bearded person: light skin tone),
    85                                  * then compare it to how it would look if the browser doesn't render it correctly
    86                                  * (bearded person + Fitzpatrick modifier).
     84                                 * To test for support, try to render a new emoji (fairy, male), then compares
     85                                 * it to how it would look if the browser doesn't render it correctly
     86                                 * (fairy + male sign).
    8787                                 */
    88                                 context.fillText( stringFromCharCode( 55358, 56788, 55356, 57339 ), 0, 0 );
     88                                context.fillText( stringFromCharCode( 55358, 56794, 8205, 9794, 65039 ), 0, 0 );
    8989                                emoji41 = canvas.toDataURL();
    9090
    9191                                context.clearRect( 0, 0, canvas.width, canvas.height );
    9292
    93                                 context.fillText( stringFromCharCode( 55358, 56788, 8203, 55356, 57339 ), 0, 0 );
     93                                context.fillText( stringFromCharCode( 55358, 56794, 8203, 9794, 65039 ), 0, 0 );
    9494                                emoji42 = canvas.toDataURL();
    9595
    9696                                return emoji41 !== emoji42;