Method: ActionView::Helpers::SanitizeHelper::ClassMethods#sanitized_allowed_attributes=
- Defined in:
- actionpack/lib/action_view/helpers/sanitize_helper.rb
#sanitized_allowed_attributes=(attributes) ⇒ Object
Adds to the Set of allowed HTML attributes for the sanitize
helper.
class Application < Rails::Application
config.action_view.sanitized_allowed_attributes = 'onclick', 'longdesc'
end
213 214 215 |
# File 'actionpack/lib/action_view/helpers/sanitize_helper.rb', line 213 def sanitized_allowed_attributes=(attributes) HTML::WhiteListSanitizer.allowed_attributes.merge(attributes) end |