Module: ActionView::Helpers::SanitizeHelper::ClassMethods
- Defined in:
- lib/rails-html-sanitizer.rb
Instance Method Summary collapse
-
#sanitized_allowed_attributes=(attributes) ⇒ Object
Replaces the allowed HTML attributes for the
sanitize
helper. -
#sanitized_allowed_tags=(tags) ⇒ Object
Replaces the allowed tags for the
sanitize
helper.
Instance Method Details
#sanitized_allowed_attributes=(attributes) ⇒ Object
Replaces the allowed HTML attributes for the sanitize
helper.
class Application < Rails::Application
config.action_view.sanitized_allowed_attributes = ['onclick', 'longdesc']
end
34 35 36 |
# File 'lib/rails-html-sanitizer.rb', line 34 def sanitized_allowed_attributes=(attributes) sanitizer_vendor.safe_list_sanitizer.allowed_attributes = attributes end |
#sanitized_allowed_tags=(tags) ⇒ Object
Replaces the allowed tags for the sanitize
helper.
class Application < Rails::Application
config.action_view. = 'table', 'tr', 'td'
end
24 25 26 |
# File 'lib/rails-html-sanitizer.rb', line 24 def () sanitizer_vendor.safe_list_sanitizer. = end |