aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/sanitize_helper.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2008-05-25 12:29:00 +0100
committerPratik Naik <pratiknaik@gmail.com>2008-05-25 12:29:00 +0100
commit98dc582742779081e71e697fcdf8d9ae2b421b16 (patch)
treef5680eef86e689a10d0f75434ba6a4e94829e439 /actionpack/lib/action_view/helpers/sanitize_helper.rb
parent6277fd91133a3566333612857510d74de60d67f4 (diff)
downloadrails-98dc582742779081e71e697fcdf8d9ae2b421b16.tar.gz
rails-98dc582742779081e71e697fcdf8d9ae2b421b16.tar.bz2
rails-98dc582742779081e71e697fcdf8d9ae2b421b16.zip
Merge docrails.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionpack/lib/action_view/helpers/sanitize_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/sanitize_helper.rb31
1 files changed, 16 insertions, 15 deletions
diff --git a/actionpack/lib/action_view/helpers/sanitize_helper.rb b/actionpack/lib/action_view/helpers/sanitize_helper.rb
index 6c0a7ec25c..b0dacfe964 100644
--- a/actionpack/lib/action_view/helpers/sanitize_helper.rb
+++ b/actionpack/lib/action_view/helpers/sanitize_helper.rb
@@ -57,7 +57,7 @@ module ActionView
self.class.white_list_sanitizer.sanitize(html, options)
end
- # Sanitizes a block of css code. Used by #sanitize when it comes across a style attribute
+ # Sanitizes a block of CSS code. Used by +sanitize+ when it comes across a style attribute.
def sanitize_css(style)
self.class.white_list_sanitizer.sanitize_css(style)
end
@@ -111,8 +111,8 @@ module ActionView
end
end
- # Gets the HTML::FullSanitizer instance used by strip_tags. Replace with
- # any object that responds to #sanitize
+ # Gets the HTML::FullSanitizer instance used by +strip_tags+. Replace with
+ # any object that responds to +sanitize+.
#
# Rails::Initializer.run do |config|
# config.action_view.full_sanitizer = MySpecialSanitizer.new
@@ -122,8 +122,8 @@ module ActionView
@full_sanitizer ||= HTML::FullSanitizer.new
end
- # Gets the HTML::LinkSanitizer instance used by strip_links. Replace with
- # any object that responds to #sanitize
+ # Gets the HTML::LinkSanitizer instance used by +strip_links+. Replace with
+ # any object that responds to +sanitize+.
#
# Rails::Initializer.run do |config|
# config.action_view.link_sanitizer = MySpecialSanitizer.new
@@ -133,8 +133,8 @@ module ActionView
@link_sanitizer ||= HTML::LinkSanitizer.new
end
- # Gets the HTML::WhiteListSanitizer instance used by sanitize and sanitize_css.
- # Replace with any object that responds to #sanitize
+ # Gets the HTML::WhiteListSanitizer instance used by sanitize and +sanitize_css+.
+ # Replace with any object that responds to +sanitize+.
#
# Rails::Initializer.run do |config|
# config.action_view.white_list_sanitizer = MySpecialSanitizer.new
@@ -144,7 +144,7 @@ module ActionView
@white_list_sanitizer ||= HTML::WhiteListSanitizer.new
end
- # Adds valid HTML attributes that the #sanitize helper checks for URIs.
+ # Adds valid HTML attributes that the +sanitize+ helper checks for URIs.
#
# Rails::Initializer.run do |config|
# config.action_view.sanitized_uri_attributes = 'lowsrc', 'target'
@@ -154,7 +154,7 @@ module ActionView
HTML::WhiteListSanitizer.uri_attributes.merge(attributes)
end
- # Adds to the Set of 'bad' tags for the #sanitize helper.
+ # Adds to the Set of 'bad' tags for the +sanitize+ helper.
#
# Rails::Initializer.run do |config|
# config.action_view.sanitized_bad_tags = 'embed', 'object'
@@ -163,7 +163,8 @@ module ActionView
def sanitized_bad_tags=(attributes)
HTML::WhiteListSanitizer.bad_tags.merge(attributes)
end
- # Adds to the Set of allowed tags for the #sanitize helper.
+
+ # Adds to the Set of allowed tags for the +sanitize+ helper.
#
# Rails::Initializer.run do |config|
# config.action_view.sanitized_allowed_tags = 'table', 'tr', 'td'
@@ -173,7 +174,7 @@ module ActionView
HTML::WhiteListSanitizer.allowed_tags.merge(attributes)
end
- # Adds to the Set of allowed html attributes for the #sanitize helper.
+ # Adds to the Set of allowed HTML attributes for the +sanitize+ helper.
#
# Rails::Initializer.run do |config|
# config.action_view.sanitized_allowed_attributes = 'onclick', 'longdesc'
@@ -183,7 +184,7 @@ module ActionView
HTML::WhiteListSanitizer.allowed_attributes.merge(attributes)
end
- # Adds to the Set of allowed css properties for the #sanitize and #sanitize_css heleprs.
+ # Adds to the Set of allowed CSS properties for the #sanitize and +sanitize_css+ heleprs.
#
# Rails::Initializer.run do |config|
# config.action_view.sanitized_allowed_css_properties = 'expression'
@@ -193,7 +194,7 @@ module ActionView
HTML::WhiteListSanitizer.allowed_css_properties.merge(attributes)
end
- # Adds to the Set of allowed css keywords for the #sanitize and #sanitize_css helpers.
+ # Adds to the Set of allowed CSS keywords for the +sanitize+ and +sanitize_css+ helpers.
#
# Rails::Initializer.run do |config|
# config.action_view.sanitized_allowed_css_keywords = 'expression'
@@ -203,7 +204,7 @@ module ActionView
HTML::WhiteListSanitizer.allowed_css_keywords.merge(attributes)
end
- # Adds to the Set of allowed shorthand css properties for the #sanitize and #sanitize_css helpers.
+ # Adds to the Set of allowed shorthand CSS properties for the +sanitize+ and +sanitize_css+ helpers.
#
# Rails::Initializer.run do |config|
# config.action_view.sanitized_shorthand_css_properties = 'expression'
@@ -213,7 +214,7 @@ module ActionView
HTML::WhiteListSanitizer.shorthand_css_properties.merge(attributes)
end
- # Adds to the Set of allowed protocols for the #sanitize helper.
+ # Adds to the Set of allowed protocols for the +sanitize+ helper.
#
# Rails::Initializer.run do |config|
# config.action_view.sanitized_allowed_protocols = 'ssh', 'feed'