Skip to content

Commit

Permalink
test European HTML entities (#86)
Browse files Browse the repository at this point in the history
to verify the functionality related to 8f02868
(PR #84) which reverts commit ef20262
(introduced by PR #23)

Co-authored-by: Christopher J. Brody <chris.brody+brodybits@gmail.com>
Co-authored-by: Christian Bewernitz <coder@karfau.de>
  • Loading branch information
brodybits and karfau committed Jul 3, 2020
2 parents 8f02868 + 6b563fc commit fb40cca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/html/normalize.vows.js
Expand Up @@ -85,5 +85,11 @@ wows.describe('html normalizer').addBatch({

var dom = new DOMParser().parseFromString('<textarea>alert(a<b&&c?"<br>":">>");</textarea>','text/xml');
assert(dom+'', '<textarea>alert(a&lt;b&amp;&amp;c?"<br/>":">>");</textarea>');
},
'European entities': function () {
var dom = new DOMParser().parseFromString('<div>&Auml;&auml;&Aring;&aring;&AElig;&aelig;&Ouml;&ouml;&Oslash;&oslash;&szlig;&Uuml;&uuml;&euro;</div>','text/html');
// For the future, it may be nicer to use \uxxxx in the assert strings
// rather than pasting in multi-byte UTF-8 Unicode characters
assert(dom+'', '<div xmlns="http://www.w3.org/1999/xhtml">ÄäÅåÆæÖöØøßÜü€</div>');
}
}).export(module);

0 comments on commit fb40cca

Please sign in to comment.