html-parser
Advanced tools
Comparing version 0.3.0 to 0.4.0
{ | ||
"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
1221
67515