module ActionView::Helpers::SanitizeHelper::ClassMethods
def full_sanitizer
end
config.action_view.full_sanitizer = MySpecialSanitizer.new
class Application < Rails::Application
any object that responds to +sanitize+.
Gets the HTML::FullSanitizer instance used by +strip_tags+. Replace with
def full_sanitizer @full_sanitizer ||= HTML::FullSanitizer.new end
def link_sanitizer
end
config.action_view.link_sanitizer = MySpecialSanitizer.new
class Application < Rails::Application
any object that responds to +sanitize+.
Gets the HTML::LinkSanitizer instance used by +strip_links+. Replace with
def link_sanitizer @link_sanitizer ||= HTML::LinkSanitizer.new end
def sanitized_allowed_attributes
def sanitized_allowed_attributes white_list_sanitizer.allowed_attributes end
def sanitized_allowed_attributes=(attributes)
end
config.action_view.sanitized_allowed_attributes = ['onclick', 'longdesc']
class Application < Rails::Application
Adds to the Set of allowed HTML attributes for the +sanitize+ helper.
def sanitized_allowed_attributes=(attributes) HTML::WhiteListSanitizer.allowed_attributes.merge(attributes) end
def sanitized_allowed_css_keywords
def sanitized_allowed_css_keywords white_list_sanitizer.allowed_css_keywords end
def sanitized_allowed_css_keywords=(attributes)
end
config.action_view.sanitized_allowed_css_keywords = ['expression']
class Application < Rails::Application
Adds to the Set of allowed CSS keywords for the +sanitize+ and +sanitize_css+ helpers.
def sanitized_allowed_css_keywords=(attributes) HTML::WhiteListSanitizer.allowed_css_keywords.merge(attributes) end
def sanitized_allowed_css_properties
def sanitized_allowed_css_properties white_list_sanitizer.allowed_css_properties end
def sanitized_allowed_css_properties=(attributes)
end
config.action_view.sanitized_allowed_css_properties = ['expression']
class Application < Rails::Application
Adds to the Set of allowed CSS properties for the #sanitize and +sanitize_css+ helpers.
def sanitized_allowed_css_properties=(attributes) HTML::WhiteListSanitizer.allowed_css_properties.merge(attributes) end
def sanitized_allowed_protocols
def sanitized_allowed_protocols white_list_sanitizer.allowed_protocols end
def sanitized_allowed_protocols=(attributes)
end
config.action_view.sanitized_allowed_protocols = ['ssh', 'feed']
class Application < Rails::Application
Adds to the Set of allowed protocols for the +sanitize+ helper.
def sanitized_allowed_protocols=(attributes) HTML::WhiteListSanitizer.allowed_protocols.merge(attributes) end
def sanitized_allowed_tags
def sanitized_allowed_tags white_list_sanitizer.allowed_tags end
def sanitized_allowed_tags=(attributes)
end
config.action_view.sanitized_allowed_tags = ['table', 'tr', 'td']
class Application < Rails::Application
Adds to the Set of allowed tags for the +sanitize+ helper.
def sanitized_allowed_tags=(attributes) HTML::WhiteListSanitizer.allowed_tags.merge(attributes) end
def sanitized_bad_tags
def sanitized_bad_tags white_list_sanitizer.bad_tags end
def sanitized_bad_tags=(attributes)
end
config.action_view.sanitized_bad_tags = ['embed', 'object']
class Application < Rails::Application
Adds to the Set of 'bad' tags for the +sanitize+ helper.
def sanitized_bad_tags=(attributes) HTML::WhiteListSanitizer.bad_tags.merge(attributes) end
def sanitized_protocol_separator
def sanitized_protocol_separator white_list_sanitizer.protocol_separator end
def sanitized_protocol_separator=(value)
def sanitized_protocol_separator=(value) white_list_sanitizer.protocol_separator = value end
def sanitized_shorthand_css_properties
def sanitized_shorthand_css_properties white_list_sanitizer.shorthand_css_properties end
def sanitized_shorthand_css_properties=(attributes)
end
config.action_view.sanitized_shorthand_css_properties = ['expression']
class Application < Rails::Application
Adds to the Set of allowed shorthand CSS properties for the +sanitize+ and +sanitize_css+ helpers.
def sanitized_shorthand_css_properties=(attributes) HTML::WhiteListSanitizer.shorthand_css_properties.merge(attributes) end
def sanitized_uri_attributes
def sanitized_uri_attributes white_list_sanitizer.uri_attributes end
def sanitized_uri_attributes=(attributes)
end
config.action_view.sanitized_uri_attributes = ['lowsrc', 'target']
class Application < Rails::Application
Adds valid HTML attributes that the +sanitize+ helper checks for URIs.
def sanitized_uri_attributes=(attributes) HTML::WhiteListSanitizer.uri_attributes.merge(attributes) end
def white_list_sanitizer
end
config.action_view.white_list_sanitizer = MySpecialSanitizer.new
class Application < Rails::Application
Replace with any object that responds to +sanitize+.
Gets the HTML::WhiteListSanitizer instance used by sanitize and +sanitize_css+.
def white_list_sanitizer @white_list_sanitizer ||= HTML::WhiteListSanitizer.new end