From a291944835e5430ca7eb71ba2f86ad2cdf5078d4 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 5 Jul 2016 10:57:41 -0400 Subject: [PATCH] FIX: Add `kbd` support to the sanitizer --- app/assets/javascripts/pretty-text/white-lister.js.es6 | 1 + test/javascripts/lib/sanitizer-test.js.es6 | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/assets/javascripts/pretty-text/white-lister.js.es6 b/app/assets/javascripts/pretty-text/white-lister.js.es6 index cac079bf6..090e0dea2 100644 --- a/app/assets/javascripts/pretty-text/white-lister.js.es6 +++ b/app/assets/javascripts/pretty-text/white-lister.js.es6 @@ -149,4 +149,5 @@ whiteListFeature('default', [ 'iframe[frameborder]', 'iframe[marginheight]', 'iframe[marginwidth]', + 'kbd' ]); diff --git a/test/javascripts/lib/sanitizer-test.js.es6 b/test/javascripts/lib/sanitizer-test.js.es6 index 6b0d2fd2e..99e9977df 100644 --- a/test/javascripts/lib/sanitizer-test.js.es6 +++ b/test/javascripts/lib/sanitizer-test.js.es6 @@ -45,6 +45,8 @@ test("sanitize", function() { cooked("a", "

a

", "it sanitizes spans"); cooked("a", "

a

", "it sanitizes spans"); cooked("a", "

a

", "it sanitizes spans"); + + cooked("Ctrl+C", "

Ctrl+C

"); }); test("urlAllowed", function() {