[wp-trac] [WordPress Trac] #32305: Emoji script is producing errors on pages with SVG content
WordPress Trac
noreply at wordpress.org
Fri May 8 07:04:32 UTC 2015
#32305: Emoji script is producing errors on pages with SVG content
--------------------------+-----------------------------
Reporter: martynasma | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version: 4.2.2
Severity: normal | Keywords:
Focuses: javascript |
--------------------------+-----------------------------
On pages that contain dynamic SVG content, such as charts generated by
JavaScript, Emoji script wp-emoji-release.min.js produces multiple errors
like this:
''Uncaught TypeError: node.className.indexOf is not a function''
The error is caused by the script traversing through document nodes, going
into SVG nodes and checking indexOf of their className which is not a
function, resulting in JS error reported on every SVG <path> node.
The error originates in this line: (taken from unminified version)
{{{
if ( ! node || ( node.className && node.className.indexOf( 'wp-exclude-
emoji' ) !== -1 ) ) {
continue;
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32305>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list