From 918106324e87bd2bd05db2eb7cf255a553637622 Mon Sep 17 00:00:00 2001 From: Duff OMelia Date: Thu, 19 Feb 2009 13:27:42 -0500 Subject: [PATCH] No longer html_escape'ing the block result of auto_link. --- actionpack/lib/action_view/helpers/text_helper.rb | 2 +- actionpack/test/template/text_helper_test.rb | 2 +- 2 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 63fe0c1..e1f1f96 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -552,7 +552,7 @@ module ActionView link_text = block_given?? yield(href) : href href = 'http://' + href unless href.index('http') == 0 - content_tag(:a, h(link_text), link_attributes.merge('href' => href)) + punctuation + content_tag(:a, link_text, link_attributes.merge('href' => href)) + punctuation end end end diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb index 5648457..93bff7a 100644 --- a/actionpack/test/template/text_helper_test.rb +++ b/actionpack/test/template/text_helper_test.rb @@ -257,7 +257,7 @@ class TextHelperTest < ActionView::TestCase def generate_result(link_text, href = nil) href ||= link_text - %{#{CGI::escapeHTML link_text}} + %{#{link_text}} end def test_auto_linking -- 1.5.5.3