moves wysiwyg sanitizer to lib [#71]
This commit is contained in:
10
lib/wysiwyg_sanitizer.rb
Normal file
10
lib/wysiwyg_sanitizer.rb
Normal 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
|
||||
Reference in New Issue
Block a user