Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

html-parser

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-parser - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

2

package.json
{
"name": "html-parser",
"version": "0.3.0",
"version": "0.4.0",
"description": "HTML/XML parser with less explosions",

@@ -5,0 +5,0 @@ "keywords": [ "html", "xml", "parser", "explosion" ],

@@ -315,3 +315,6 @@ var parseContext = require('./context');

//self closing
tagStack.pop();
var scope = tagStack.pop();
if (scope === ignoring) {
ignoring = null;
}
}

@@ -318,0 +321,0 @@ if (ignoring || toRemove.elements(name)) {

@@ -80,2 +80,10 @@ var should = require('should');

});
it('should remove self-closing elements', function() {
var html = '<foo><br />asdf</foo>';
var sanitized = helpers.parser.sanitize(html, {
elements: [ 'br' ]
});
sanitized.should.equal('<foo>asdf</foo>');
});
});

Sorry, the diff of this file is not supported yet

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