From 325fa58ef585b4303a41270e231918f298ee30bd Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 12 Feb 2010 16:38:24 -0800 Subject: Safely concat the ending tag to simple_format or it will be escaped --- actionpack/lib/action_view/helpers/text_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/helpers/text_helper.rb') 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+/, "

\n\n#{start_tag}") # 2+ newline -> paragraph text.gsub!(/([^\n]\n)(?=[^\n])/, '\1
') # 1 newline -> br text.insert 0, start_tag - text << "

" + text.safe_concat("

") end # Turns all URLs and e-mail addresses into clickable links. The :link option -- cgit v1.2.3