Emoji: do not try to replace emoji chars inside dynamic SVGs.

Fixes #32305 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@32478 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2015-05-09 23:43:07 +00:00
parent cfa32bc1d7
commit cdd007cc62

View File

@ -70,11 +70,13 @@
node = node.parentNode;
}
if ( ! node || ( node.className && node.className.indexOf( 'wp-exclude-emoji' ) !== -1 ) ) {
if ( ! node || node.nodeType !== 1 || ( 'ownerSVGElement' in node ) ||
( node.className && typeof node.className === 'string' && node.className.indexOf( 'wp-exclude-emoji' ) !== -1 ) ) {
continue;
}
if ( node.nodeType === 1 && test( node.textContent ) ) {
if ( test( node.textContent ) ) {
parse( node );
}
}