aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-02-18 23:22:15 +0100
committerXavier Noria <fxn@hashref.com>2011-02-18 23:22:15 +0100
commitf41bf6938fd4aa5a83777cc767f7f32ace5f6539 (patch)
treeeb85baf61ec970ca090ed057536c2d0ee1b18e5b /actionpack/lib/action_view
parentfbfa30a1eeaaab22ac8f43a4137ec8282920fe15 (diff)
parent220cb107b672d65fdc0488d4ff310ab04b62b463 (diff)
downloadrails-f41bf6938fd4aa5a83777cc767f7f32ace5f6539.tar.gz
rails-f41bf6938fd4aa5a83777cc767f7f32ace5f6539.tar.bz2
rails-f41bf6938fd4aa5a83777cc767f7f32ace5f6539.zip
merges docrails
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/asset_tag_helpers/asset_paths.rb2
-rw-r--r--actionpack/lib/action_view/helpers/text_helper.rb7
2 files changed, 8 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helpers/asset_paths.rb b/actionpack/lib/action_view/helpers/asset_tag_helpers/asset_paths.rb
index b4e61f2034..014a03c54d 100644
--- a/actionpack/lib/action_view/helpers/asset_tag_helpers/asset_paths.rb
+++ b/actionpack/lib/action_view/helpers/asset_tag_helpers/asset_paths.rb
@@ -21,7 +21,7 @@ module ActionView
@controller = controller
end
- # Add the the extension +ext+ if not present. Return full URLs otherwise untouched.
+ # Add the extension +ext+ if not present. Return full URLs otherwise untouched.
# Prefix with <tt>/dir/</tt> if lacking a leading +/+. Account for relative URL
# roots. Rewrite the asset path for cache-busting asset ids. Include
# asset host, if configured, with the correct request protocol.
diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb
index 4f7f5c454f..2d3c5fe7e7 100644
--- a/actionpack/lib/action_view/helpers/text_helper.rb
+++ b/actionpack/lib/action_view/helpers/text_helper.rb
@@ -234,6 +234,10 @@ module ActionView
#
# You can pass any HTML attributes into <tt>html_options</tt>. These
# will be added to all created paragraphs.
+ #
+ # ==== Options
+ # * <tt>:sanitize</tt> - If +false+, does not sanitize +text+.
+ #
# ==== Examples
# my_text = "Here is some basic text...\n...with a line break."
#
@@ -247,6 +251,9 @@ module ActionView
#
# simple_format("Look ma! A class!", :class => 'description')
# # => "<p class='description'>Look ma! A class!</p>"
+ #
+ # simple_format("<span>I'm allowed!</span> It's true.", {}, :sanitize => false)
+ # # => "<p><span>I'm allowed!</span> It's true.</p>"
def simple_format(text, html_options={}, options={})
text = ''.html_safe if text.nil?
start_tag = tag('p', html_options, true)