Make WordPress Core

Changeset 32478


Ignore:
Timestamp:
05/09/2015 11:43:07 PM (11 years ago)
Author:
azaozz
Message:

Emoji: do not try to replace emoji chars inside dynamic SVGs.
Fixes #32305 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/wp-emoji.js

    r32347 r32478  
    7171                                                        }
    7272
    73                                                         if ( ! node || ( node.className && node.className.indexOf( 'wp-exclude-emoji' ) !== -1 ) ) {
     73                                                        if ( ! node || node.nodeType !== 1 || ( 'ownerSVGElement' in node ) ||
     74                                                                ( node.className && typeof node.className === 'string' && node.className.indexOf( 'wp-exclude-emoji' ) !== -1 ) ) {
     75
    7476                                                                continue;
    7577                                                        }
    7678
    77                                                         if ( node.nodeType === 1 && test( node.textContent ) ) {
     79                                                        if ( test( node.textContent ) ) {
    7880                                                                parse( node );
    7981                                                        }
Note: See TracChangeset for help on using the changeset viewer.