diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2010-02-12 16:38:24 -0800 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2010-02-12 16:38:24 -0800 |
commit | 325fa58ef585b4303a41270e231918f298ee30bd (patch) | |
tree | add3c21928ef6db6963f16e74c3ea38e3dbfc749 | |
parent | dc3cc6c608b93209b23bbebd2ade04835abd6f6c (diff) | |
download | rails-325fa58ef585b4303a41270e231918f298ee30bd.tar.gz rails-325fa58ef585b4303a41270e231918f298ee30bd.tar.bz2 rails-325fa58ef585b4303a41270e231918f298ee30bd.zip |
Safely concat the ending tag to simple_format or it will be escaped
-rw-r--r-- | actionpack/lib/action_view/helpers/text_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index b63617322f..d84515d5b5 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -332,7 +332,7 @@ module ActionView text.gsub!(/\n\n+/, "</p>\n\n#{start_tag}") # 2+ newline -> paragraph text.gsub!(/([^\n]\n)(?=[^\n])/, '\1<br />') # 1 newline -> br text.insert 0, start_tag - text << "</p>" + text.safe_concat("</p>") end # Turns all URLs and e-mail addresses into clickable links. The <tt>:link</tt> option |