Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-03-06 22:27:56 +0300
committerDouwe Maan <douwe@gitlab.com>2017-03-06 22:27:56 +0300
commit03b310895b2a41a7cc8331fac6f3e9c9f9687a26 (patch)
treea01d8e2ad426ae4e92ce9a8636a8212c742110eb /lib
parent79b8f02bb1780b3de9eb01d69aa3ff59954d5324 (diff)
parent9a672c4f81984e07ab2c0c0c456c798adff91514 (diff)
Merge branch '21605-allow-html5-details' into 'master'
SanitizationFilter allows html5 details and summary (Issue #21605) Closes #21605 See merge request !6568
Diffstat (limited to 'lib')
-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)