123456789_123456789_123456789_123456789_123456789_

Module: ActionView::Helpers::SanitizeHelper::ClassMethods

Do not use. This module is for internal use only.
Relationships & Source Files
Defined in: actionview/lib/action_view/helpers/sanitize_helper.rb

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#full_sanitizer (rw)

Gets the Rails::HTML::FullSanitizer instance used by ActionView::Helpers::SanitizeHelper#strip_tags. Replace with any object that responds to ActionView::Helpers::SanitizeHelper#sanitize.

class Application < Rails::Application
  config.action_view.full_sanitizer = MySpecialSanitizer.new
end
[ GitHub ]

  
# File 'actionview/lib/action_view/helpers/sanitize_helper.rb', line 175

def full_sanitizer
  @full_sanitizer ||= sanitizer_vendor.full_sanitizer.new
end

#full_sanitizer=(value) (rw)

[ GitHub ]

  
# File 'actionview/lib/action_view/helpers/sanitize_helper.rb', line 155

attr_writer :full_sanitizer, :link_sanitizer, :safe_list_sanitizer

#safe_list_sanitizer (rw)

Gets the Rails::HTML::SafeListSanitizer instance used by sanitize and ActionView::Helpers::SanitizeHelper#sanitize_css. Replace with any object that responds to ActionView::Helpers::SanitizeHelper#sanitize.

class Application < Rails::Application
  config.action_view.safe_list_sanitizer = MySpecialSanitizer.new
end
[ GitHub ]

  
# File 'actionview/lib/action_view/helpers/sanitize_helper.rb', line 195

def safe_list_sanitizer
  @safe_list_sanitizer ||= sanitizer_vendor.safe_list_sanitizer.new
end

#safe_list_sanitizer=(value) (rw)

[ GitHub ]

  
# File 'actionview/lib/action_view/helpers/sanitize_helper.rb', line 155

attr_writer :full_sanitizer, :link_sanitizer, :safe_list_sanitizer

Instance Method Details

#sanitized_allowed_attributes

[ GitHub ]

  
# File 'actionview/lib/action_view/helpers/sanitize_helper.rb', line 165

def sanitized_allowed_attributes
  sanitizer_vendor.safe_list_sanitizer.allowed_attributes
end

#sanitized_allowed_tags

[ GitHub ]

  
# File 'actionview/lib/action_view/helpers/sanitize_helper.rb', line 161

def sanitized_allowed_tags
  sanitizer_vendor.safe_list_sanitizer.allowed_tags
end

#sanitizer_vendor

[ GitHub ]

  
# File 'actionview/lib/action_view/helpers/sanitize_helper.rb', line 157

def sanitizer_vendor
  ActionView::Helpers::SanitizeHelper.sanitizer_vendor
end