aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-04-05 13:59:35 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-04-05 16:22:53 -0700
commit2e757bc298cef715e5c56945161bbd84f2610729 (patch)
treec252a10dad3897ff09f1931a0bb0bb132c7dd375 /actionpack/lib
parente9020b4b5dbd4a19e288c613a86c78e32010c361 (diff)
downloadrails-2e757bc298cef715e5c56945161bbd84f2610729.tar.gz
rails-2e757bc298cef715e5c56945161bbd84f2610729.tar.bz2
rails-2e757bc298cef715e5c56945161bbd84f2610729.zip
do not return html safe strings from auto_link
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_view/helpers/text_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb
index 2d3c5fe7e7..bdda1df437 100644
--- a/actionpack/lib/action_view/helpers/text_helper.rb
+++ b/actionpack/lib/action_view/helpers/text_helper.rb
@@ -303,7 +303,7 @@ module ActionView
# # => "Welcome to my new blog at <a href=\"http://www.myblog.com/\" target=\"_blank\">http://www.myblog.com</a>.
# Please e-mail me at <a href=\"mailto:me@email.com\">me@email.com</a>."
def auto_link(text, *args, &block)#link = :all, html = {}, &block)
- return ''.html_safe if text.blank?
+ return '' if text.blank?
options = args.size == 2 ? {} : args.extract_options! # this is necessary because the old auto_link API has a Hash as its last parameter
unless args.empty?
@@ -507,7 +507,7 @@ module ActionView
end
content_tag(:a, link_text, link_attributes.merge('href' => href), !!options[:sanitize]) + punctuation.reverse.join('')
end
- end.html_safe
+ end
end
# Turns all email addresses into clickable links. If a block is given,