Comparing version 0.3.2 to 0.3.3
@@ -59,2 +59,3 @@ // wrapper for non-node envs | ||
parser.strict = !!strict | ||
parser.noscript = !!(strict || parser.opt.noscript) | ||
parser.state = S.BEGIN | ||
@@ -132,8 +133,9 @@ parser.ENTITIES = Object.create(sax.ENTITIES) | ||
SAXParser.prototype = { | ||
end : function () { end(this) }, | ||
write : write, | ||
resume : function () { this.error = null; return this }, | ||
close : function () { return this.write(null) }, | ||
} | ||
SAXParser.prototype = | ||
{ end: function () { end(this) } | ||
, write: write | ||
, resume: function () { this.error = null; return this } | ||
, close: function () { return this.write(null) } | ||
, end: function () { return this.write(null) } | ||
} | ||
@@ -471,3 +473,3 @@ try { | ||
// special case for <script> in non-strict mode. | ||
if (!parser.strict && parser.tagName.toLowerCase() === "script") { | ||
if (!parser.noscript && parser.tagName.toLowerCase() === "script") { | ||
parser.state = S.SCRIPT | ||
@@ -965,3 +967,3 @@ } else { | ||
strictFail("Invalid character entity") | ||
parser[buffer] += "&" + parser.entity | ||
parser[buffer] += "&" + parser.entity + c | ||
parser.entity = "" | ||
@@ -968,0 +970,0 @@ parser.state = returnState |
{ "name" : "sax" | ||
, "description": "An evented streaming XML parser in JavaScript" | ||
, "author" : "Isaac Z. Schlueter <i@izs.me>" | ||
, "version" : "0.3.2" | ||
, "main" : "lib/sax" | ||
, "author" : "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)" | ||
, "version" : "0.3.3" | ||
, "main" : "lib/sax.js" | ||
, "license" : { "type": "MIT" | ||
@@ -7,0 +7,0 @@ , "url": "https://raw.github.com/isaacs/sax-js/master/LICENSE" } |
@@ -202,2 +202,6 @@ # sax js | ||
`noscript` - In non-strict mode, `<script>` tags trigger a `"script"` | ||
event, and their contents are not checked for special xml characters. | ||
If you pass `noscript: true`, then this behavior is suppressed. | ||
## Reporting Problems | ||
@@ -204,0 +208,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
435403
43
1802
214
34
2