Socket
Socket
Sign inDemoInstall

sax

Package Overview
Dependencies
0
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.4 to 0.2.5

test/xmlns-xml-default-prefix-attribute.js

14

lib/sax.js

@@ -39,3 +39,5 @@ // wrapper for non-node envs

if (this.opt.xmlns) this.ns = {} // NS bindings stacks: prefix -> [uri, uri...]
if (this.opt.xmlns) this.ns = {
"xml": ["http://www.w3.org/XML/1998/namespace"]
} // NS bindings stacks: prefix -> [uri, uri...]

@@ -357,5 +359,9 @@ // mostly just for error reporting

var prefix = n == "xmlns" ? "" : qn.local
parser.ns[prefix] = parser.ns[prefix] || []
parser.ns[prefix].unshift(parser.attribValue)
parser.tag.bindings.push(prefix)
if(prefix === "xml" && parser.attribValue !== "http://www.w3.org/XML/1998/namespace") {
strictFail(parser, "Cannot bind the xml prefix to " + parser.attribValue)
} else {
parser.ns[prefix] = parser.ns[prefix] || []
parser.ns[prefix].unshift(parser.attribValue)
parser.tag.bindings.push(prefix)
}
}

@@ -362,0 +368,0 @@

{ "name" : "sax"
, "description": "An evented streaming XML parser in JavaScript"
, "author" : "Isaac Z. Schlueter <i@izs.me>"
, "version" : "0.2.4"
, "version" : "0.2.5"
, "main" : "lib/sax"

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc