From c7658d94579d0e802bcdd43fe8fdee24c9a45dcb Mon Sep 17 00:00:00 2001 From: paolo-delmundo Date: Wed, 2 Oct 2013 20:49:20 +0100 Subject: fix($sanitize): sanitize DOCTYPE declarations correctly HTML to be sanitized that contains a DOCTYPE declaration were causing the HTML parser to throw an error. Now the parser correctly removes the declarations when sanitizing HTML. Closes #3931 --- test/ngSanitize/sanitizeSpec.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/ngSanitize/sanitizeSpec.js b/test/ngSanitize/sanitizeSpec.js index 2a53b532..bb52bb9a 100644 --- a/test/ngSanitize/sanitizeSpec.js +++ b/test/ngSanitize/sanitizeSpec.js @@ -24,7 +24,7 @@ describe('HTML', function() { attrs: attrs, unary: unary }; - // Since different browsers handle newlines differenttly we trim + // Since different browsers handle newlines differently we trim // so that it is easier to write tests. angular.forEach(attrs, function(value, key) { attrs[key] = value.replace(/^\s*/, '').replace(/\s*$/, '') @@ -80,6 +80,13 @@ describe('HTML', function() { expectHTML('a