14519: Fixes bug by adding table tags to the sanitizer white list
authorLucas Di Pentima <ldipentima@veritasgenetics.com>
Wed, 21 Nov 2018 22:32:23 +0000 (19:32 -0300)
committerLucas Di Pentima <ldipentima@veritasgenetics.com>
Mon, 26 Nov 2018 18:41:02 +0000 (15:41 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>

apps/workbench/app/helpers/application_helper.rb

index 2b48d74b20c09d407edb11d36bdb06d7152bdaa8..379eb6424435ec2d39090a02e827048f84d6b09a 100644 (file)
@@ -16,7 +16,8 @@ module ApplicationHelper
   end
 
   def render_markup(markup)
-    sanitize(raw(RedCloth.new(markup.to_s).to_html(:refs_arvados, :textile))) if 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)
   end
 
   def human_readable_bytes_html(n)