Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

improve accuracy of simple_format documentation. span doesn't get san…

…itized.
  • Loading branch information...
commit 21b55e4462c2a9d3a6420d2754ab63a9d6f01da8 1 parent c6d9f4e
@rsl rsl authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 actionpack/lib/action_view/helpers/text_helper.rb
View
7 actionpack/lib/action_view/helpers/text_helper.rb
@@ -250,8 +250,11 @@ def word_wrap(text, options = {})
# 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)
Please sign in to comment.
Something went wrong with that request. Please try again.