summaryrefslogtreecommitdiff
path: root/lib/banzai/filter/sanitization_filter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/banzai/filter/sanitization_filter.rb')
-rw-r--r--lib/banzai/filter/sanitization_filter.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/banzai/filter/sanitization_filter.rb b/lib/banzai/filter/sanitization_filter.rb
index f6314040f28..06dddc74eba 100644
--- a/lib/banzai/filter/sanitization_filter.rb
+++ b/lib/banzai/filter/sanitization_filter.rb
@@ -12,8 +12,8 @@ module Banzai
def customize_allowlist(allowlist)
# Allow table alignment; we allow specific text-align values in a
# transformer below
- allowlist[:attributes]['th'] = %w(style)
- allowlist[:attributes]['td'] = %w(style)
+ allowlist[:attributes]['th'] = %w[style]
+ allowlist[:attributes]['td'] = %w[style]
allowlist[:css] = { properties: ['text-align'] }
# Allow the 'data-sourcepos' from CommonMark on all elements
@@ -25,7 +25,7 @@ module Banzai
# Allow `id` in a and li elements for footnotes
# and remove any `id` properties not matching for footnotes
allowlist[:attributes]['a'].push('id')
- allowlist[:attributes]['li'] = %w(id)
+ allowlist[:attributes]['li'] = %w[id]
allowlist[:transformers].push(self.class.remove_non_footnote_ids)
allowlist
@@ -64,3 +64,5 @@ module Banzai
end
end
end
+
+Banzai::Filter::SanitizationFilter.prepend_if_ee('EE::Banzai::Filter::SanitizationFilter')