summaryrefslogtreecommitdiff
path: root/lib/banzai
diff options
context:
space:
mode:
authorJames <git@jamedjo.co.uk>2016-09-28 12:46:11 +0100
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2017-03-06 16:27:49 +0000
commit00f5cb84d55036542165c756e235619631bc7dee (patch)
treed2124a1ebb272019ed44351363eed0d9d06c971e /lib/banzai
parent0a58a8c8258d26e7f5c782ca1cce8665d230fa83 (diff)
downloadgitlab-ce-00f5cb84d55036542165c756e235619631bc7dee.tar.gz
SanitizationFilter allows html5 details and summary (Issue #21605)
Also adds details/summary tags to Copy-as-GFM
Diffstat (limited to 'lib/banzai')
-rw-r--r--lib/banzai/filter/sanitization_filter.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/banzai/filter/sanitization_filter.rb b/lib/banzai/filter/sanitization_filter.rb
index af1e575fc89..d5f9e252f62 100644
--- a/lib/banzai/filter/sanitization_filter.rb
+++ b/lib/banzai/filter/sanitization_filter.rb
@@ -35,6 +35,10 @@ module Banzai
# Allow span elements
whitelist[:elements].push('span')
+ # Allow html5 details/summary elements
+ whitelist[:elements].push('details')
+ whitelist[:elements].push('summary')
+
# Allow abbr elements with title attribute
whitelist[:elements].push('abbr')
whitelist[:attributes]['abbr'] = %w(title)