excluding nodeType 1 SVG elements too

This commit is contained in:
Andrea Giammarchi
2015-06-17 10:01:12 +01:00
parent f5ca4f51f9
commit 3c0c13d3a5
6 changed files with 30 additions and 9 deletions

View File

@ -239,8 +239,8 @@ define(function () {
// used to find HTML special chars in attributes
rescaper = /[&<>'"]/g,
// nodes with type 1 which should **not** be parsed
shouldntBeParsed = /IFRAME|NOFRAMES|NOSCRIPT|SCRIPT|SELECT|STYLE|TEXTAREA/,
// nodes with type 1 which should **not** be parsed (including lower case svg)
shouldntBeParsed = /IFRAME|NOFRAMES|NOSCRIPT|SCRIPT|SELECT|STYLE|TEXTAREA|[a-z]/,
// just a private shortcut
fromCharCode = String.fromCharCode;