Socket
Socket
Sign inDemoInstall

sax

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sax - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

test/issue-30.js

25

lib/sax.js

@@ -324,4 +324,5 @@ // wrapper for non-node envs

var t = parser.tags.length
if (!parser.strict) parser.tagName = parser.tagName[parser.tagCase]()
var closeTo = parser.tagName
var tagName = parser.tagName
if (!parser.strict) tagName = tagName[parser.tagCase]()
var closeTo = tagName
while (t --) {

@@ -334,4 +335,11 @@ var close = parser.tags[t]

}
// didn't find it. we already failed for strict, so just abort.
if (t < 0) return
if (t < 0) {
strictFail(parser, "Unmatched closing tag: "+parser.tagName)
parser.textNode += "</" + parser.tagName + ">"
parser.state = S.TEXT
return
}
parser.tagName = tagName
var s = parser.tags.length

@@ -527,4 +535,4 @@ while (s --> t) {

} else {
strictFail(parser, "Invalid comment")
parser.comment += "-" + c
parser.state = S.COMMENT
}

@@ -534,4 +542,9 @@ continue

case S.COMMENT_ENDED:
if (c !== ">") strictFail(parser, "Malformed comment")
else parser.state = S.TEXT
if (c !== ">") {
strictFail(parser, "Malformed comment")
// allow <!-- blah -- bloo --> in non-strict mode,
// which is a comment of " blah -- bloo "
parser.comment += "--" + c
parser.state = S.COMMENT
} else parser.state = S.TEXT
continue

@@ -538,0 +551,0 @@

{ "name" : "sax"
, "author" : "Isaac Z. Schlueter <i@izs.me>"
, "version" : "0.2.2"
, "version" : "0.2.3"
, "main" : "lib/sax"

@@ -5,0 +5,0 @@ , "license" : "MIT"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc