html-parser
Advanced tools
Comparing version 0.6.2 to 0.6.3
{ | ||
"name": "html-parser", | ||
"version": "0.6.2", | ||
"version": "0.6.3", | ||
"description": "HTML/XML parser with less explosions", | ||
@@ -5,0 +5,0 @@ "keywords": [ "html", "xml", "parser", "explosion" ], |
@@ -354,3 +354,6 @@ var parseContext = require('./context'); | ||
sanitized += ' ' + name + '="' + value.replace(/"/g, '"') + '"'; | ||
sanitized += ' ' + name; | ||
if (value) { | ||
sanitized += '="' + value.replace(/"/g, '"') + '"'; | ||
} | ||
}, | ||
@@ -357,0 +360,0 @@ |
@@ -112,2 +112,10 @@ var should = require('should'); | ||
}); | ||
it('should handle attributes with no value', function() { | ||
var html = '<p novalue1 novalue2>foo</p>'; | ||
var sanitized = helpers.parser.sanitize(html, { | ||
attributes: [ 'novalue1' ] | ||
}); | ||
sanitized.should.equal('<p novalue2>foo</p>'); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
1338
71403