aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2010-02-12 16:38:24 -0800
committerDavid Heinemeier Hansson <david@loudthinking.com>2010-02-12 16:38:24 -0800
commit325fa58ef585b4303a41270e231918f298ee30bd (patch)
treeadd3c21928ef6db6963f16e74c3ea38e3dbfc749 /actionpack
parentdc3cc6c608b93209b23bbebd2ade04835abd6f6c (diff)
downloadrails-325fa58ef585b4303a41270e231918f298ee30bd.tar.gz
rails-325fa58ef585b4303a41270e231918f298ee30bd.tar.bz2
rails-325fa58ef585b4303a41270e231918f298ee30bd.zip
Safely concat the ending tag to simple_format or it will be escaped
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/helpers/text_helper.rb2
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