Files
nairobi/lib/wysiwyg_sanitizer.rb
Raúl Fuentes d574657b77 Fixes for the review made by @javierm
this commit will be merged with the others when the chages
are accepted
2018-09-12 12:35:28 +02:00

10 lines
286 B
Ruby

class WYSIWYGSanitizer
ALLOWED_TAGS = %w(p ul ol li strong em u s img a h1 h2 h3 h4 h6 pre addres div)
ALLOWED_ATTRIBUTES = %w(href style src alt)
def sanitize(html)
ActionController::Base.helpers.sanitize(html, tags: ALLOWED_TAGS, attributes: ALLOWED_ATTRIBUTES)
end
end