aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ngSanitize/sanitizeSpec.js10
1 files changed, 9 insertions, 1 deletions
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<SCRIPT>evil< / scrIpt >c.').toEqual('ac.');
});
+ it('should remove DOCTYPE header', function() {
+ expectHTML('<!DOCTYPE html>').toEqual('');
+ expectHTML('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"\n"http://www.w3.org/TR/html4/strict.dtd">').toEqual('');
+ expectHTML('a<!DOCTYPE html>c.').toEqual('ac.');
+ expectHTML('a<!DocTyPe html>c.').toEqual('ac.');
+ });
+
it('should remove nested script', function() {
expectHTML('a< SCRIPT >A< SCRIPT >evil< / scrIpt >B< / scrIpt >c.').toEqual('ac.');
});
@@ -286,5 +293,6 @@ describe('HTML', function() {
});
});
+
});
});