Merge branch '14691-suggested-ssh-config-update'
[arvados.git] / apps / workbench / app / helpers / application_helper.rb
index 2b48d74b20c09d407edb11d36bdb06d7152bdaa8..15bf77fa094f188e5b3f8be980c5c57e3d73bcfe 100644 (file)
@@ -15,8 +15,13 @@ module ApplicationHelper
     Rails.configuration.arvados_v1_base.gsub /https?:\/\/|\/arvados\/v1/,''
   end
 
+  def current_uuid_prefix
+    current_api_host[0..4]
+  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 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)