diff options
author | RSL <sconds@gmail.com> | 2013-04-09 17:21:26 -0400 |
---|---|---|
committer | RSL <sconds@gmail.com> | 2013-04-09 17:21:26 -0400 |
commit | 21b55e4462c2a9d3a6420d2754ab63a9d6f01da8 (patch) | |
tree | c703dc4e789072f99e19ef3c1cb8d9575d5145a8 | |
parent | c6d9f4edb337f6bf0ca2f5af92aa9d68695a95c2 (diff) | |
download | rails-21b55e4462c2a9d3a6420d2754ab63a9d6f01da8.tar.gz rails-21b55e4462c2a9d3a6420d2754ab63a9d6f01da8.tar.bz2 rails-21b55e4462c2a9d3a6420d2754ab63a9d6f01da8.zip |
improve accuracy of simple_format documentation. span doesn't get sanitized.
-rw-r--r-- | actionpack/lib/action_view/helpers/text_helper.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index 883d97d06a..147f9fd8ed 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -250,8 +250,11 @@ 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>" + # simple_format("<blink>Unblinkable.</blink>") + # # => "<p>Unblinkable.</p>" + # + # simple_format("<blink>Blinkable!</blink> It's true.", {}, sanitize: false) + # # => "<p><blink>Blinkable!</span> It's true.</p>" def simple_format(text, html_options = {}, options = {}) wrapper_tag = options.fetch(:wrapper_tag, :p) |