diff --git a/lib/qiita/markdown/filters/final_sanitizer.rb b/lib/qiita/markdown/filters/final_sanitizer.rb index 0f33252..878508f 100644 --- a/lib/qiita/markdown/filters/final_sanitizer.rb +++ b/lib/qiita/markdown/filters/final_sanitizer.rb @@ -63,6 +63,9 @@ class FinalSanitizer < ::HTML::Pipeline::Filter "th" => [ "style", ], + "details" => [ + "open", + ], "video" => %w[ src autoplay diff --git a/lib/qiita/markdown/filters/user_input_sanitizer.rb b/lib/qiita/markdown/filters/user_input_sanitizer.rb index de62447..ca94082 100644 --- a/lib/qiita/markdown/filters/user_input_sanitizer.rb +++ b/lib/qiita/markdown/filters/user_input_sanitizer.rb @@ -16,6 +16,7 @@ class UserInputSanitizer < ::HTML::Pipeline::Filter "blockquote" => %w[cite] + Embed::Tweet::ATTRIBUTES, "code" => %w[data-metadata], "div" => %w[class data-type data-metadata], + "details" => %w[open], "font" => %w[color], "h1" => %w[id], "h2" => %w[id], diff --git a/spec/qiita/markdown/processor_spec.rb b/spec/qiita/markdown/processor_spec.rb index 602fc2c..a7a7487 100644 --- a/spec/qiita/markdown/processor_spec.rb +++ b/spec/qiita/markdown/processor_spec.rb @@ -1067,6 +1067,11 @@ puts "Hello, World" ``` + +
Folding sample2 + + it allows open attributes +
MARKDOWN end @@ -1076,6 +1081,9 @@
puts "Hello, World"
             
+
Folding sample2 +

it allows open attributes

+
HTML end end