FIX: Add kbd support to the sanitizer

This commit is contained in:
Robin Ward 2016-07-05 10:57:41 -04:00
parent bba0fd0654
commit a291944835
2 changed files with 3 additions and 0 deletions

View file

@ -149,4 +149,5 @@ whiteListFeature('default', [
'iframe[frameborder]', 'iframe[frameborder]',
'iframe[marginheight]', 'iframe[marginheight]',
'iframe[marginwidth]', 'iframe[marginwidth]',
'kbd'
]); ]);

View file

@ -45,6 +45,8 @@ test("sanitize", function() {
cooked("<span class=\"-bbcode-s fa fa-spin\">a</span>", "<p><span>a</span></p>", "it sanitizes spans"); cooked("<span class=\"-bbcode-s fa fa-spin\">a</span>", "<p><span>a</span></p>", "it sanitizes spans");
cooked("<span class=\"fa fa-spin -bbcode-s\">a</span>", "<p><span>a</span></p>", "it sanitizes spans"); cooked("<span class=\"fa fa-spin -bbcode-s\">a</span>", "<p><span>a</span></p>", "it sanitizes spans");
cooked("<span class=\"bbcode-s\">a</span>", "<p><span class=\"bbcode-s\">a</span></p>", "it sanitizes spans"); cooked("<span class=\"bbcode-s\">a</span>", "<p><span class=\"bbcode-s\">a</span></p>", "it sanitizes spans");
cooked("<kbd>Ctrl</kbd>+<kbd>C</kbd>", "<p><kbd>Ctrl</kbd>+<kbd>C</kbd></p>");
}); });
test("urlAllowed", function() { test("urlAllowed", function() {