14519: Adds more table related tags to the whitelist
authorLucas Di Pentima <ldipentima@veritasgenetics.com>
Mon, 26 Nov 2018 19:42:11 +0000 (16:42 -0300)
committerLucas Di Pentima <ldipentima@veritasgenetics.com>
Mon, 26 Nov 2018 19:42:11 +0000 (16:42 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>

apps/workbench/app/helpers/application_helper.rb

index 379eb6424435ec2d39090a02e827048f84d6b09a..c4a801d68b0a645fe7c10de9cdee91f642ed4ab7 100644 (file)
@@ -16,8 +16,8 @@ module ApplicationHelper
   end
 
   def render_markup(markup)
-    allowed_tags = Rails::Html::Sanitizer.white_list_sanitizer.allowed_tags + %w(table tbody th tr td)
-    sanitize(raw(RedCloth.new(markup.to_s).to_html(:refs_arvados, :textile)), tags: allowed_tags)
+    allowed_tags = Rails::Html::Sanitizer.white_list_sanitizer.allowed_tags + %w(table tbody th tr td col colgroup caption thead tfoot)
+    sanitize(raw(RedCloth.new(markup.to_s).to_html(:refs_arvados, :textile)), tags: allowed_tags) if markup
   end
 
   def human_readable_bytes_html(n)