Make WordPress Core

Changeset 32679


Ignore:
Timestamp:
06/01/2015 06:24:12 PM (10 years ago)
Author:
azaozz
Message:

Emoji: make sure we parse only strings or DOM nodes that have children.
Props peterwilsoncc. Fixes #32300.

File:
1 edited

Legend:

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

    r32478 r32679  
    121121         */
    122122        function parse( object, args ) {
    123             if ( ! replaceEmoji || ! twemoji ) {
     123            if ( ! replaceEmoji || ! twemoji || ! object ||
     124                ( 'string' !== typeof object && ( ! object.childNodes || ! object.childNodes.length ) ) ) {
     125
    124126                return object;
    125127            }
Note: See TracChangeset for help on using the changeset viewer.