Skip to content
Snippets Groups Projects
Commit a82eda56 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

default sanitize for static

parent 9c704a9b
No related branches found
No related tags found
No related merge requests found
......@@ -66,9 +66,7 @@ module Admin::ApplicationHelper
def prepare_html_for_static(html, university)
text = html.to_s
text = sanitize text,
tags: %w(table figure figcaption strong em b i u p code pre tt samp kbd var sub sup dfn cite big small address hr br span h1 h2 h3 h4 h5 h6 ul ol li dl dt dd abbr acronym a img blockquote del ins),
attributes: %w(rel href src srcset width height alt cite datetime title class name xml:lang abbr style target)
text = sanitize text
text.gsub! "\r", ''
text.gsub! "\n", ' '
text.gsub! "/rails/active_storage", "#{university.url}/rails/active_storage"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment