summaryrefslogtreecommitdiff
path: root/lib/banzai
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2018-06-15 14:05:26 +0200
committerDouwe Maan <douwe@selenight.nl>2018-06-18 10:54:04 +0200
commite1a77fa757c65cf243e6b74bf83a394da923ef0f (patch)
tree04bc841528fbde88b083e350acffa67cd5aa5cae /lib/banzai
parentbc2cf82f68d64622e3ca2facb601c711bf1682e6 (diff)
downloadgitlab-ce-e1a77fa757c65cf243e6b74bf83a394da923ef0f.tar.gz
Whitelist text-align property for th and td
Diffstat (limited to 'lib/banzai')
-rw-r--r--lib/banzai/filter/sanitization_filter.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/banzai/filter/sanitization_filter.rb b/lib/banzai/filter/sanitization_filter.rb
index 6786b9d07b6..afc2ca4e362 100644
--- a/lib/banzai/filter/sanitization_filter.rb
+++ b/lib/banzai/filter/sanitization_filter.rb
@@ -25,10 +25,11 @@ module Banzai
# Only push these customizations once
return if customized?(whitelist[:transformers])
- # Allow table alignment; we whitelist specific style properties in a
+ # Allow table alignment; we whitelist specific text-align values in a
# transformer below
whitelist[:attributes]['th'] = %w(style)
whitelist[:attributes]['td'] = %w(style)
+ whitelist[:css] = { properties: ['text-align'] }
# Allow span elements
whitelist[:elements].push('span')