Add WYSIWYGSanitizer

This commit is contained in:
kikito
2015-07-31 15:40:32 +02:00
parent 2ea638967b
commit 9ab8910329
2 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
class WYSIWYGSanitizer
ALLOWED_TAGS = %w(p ul ol li strong em u s)
ALLOWED_ATTRIBUTES = []
def sanitize(html)
ActionController::Base.helpers.sanitize(html, tags: ALLOWED_TAGS, attributes: ALLOWED_ATTRIBUTES)
end
end