From 79438b46382aa08ea83d740247eb16365e6d2327 Mon Sep 17 00:00:00 2001 From: Zach Brock Date: Tue, 24 Nov 2009 23:51:51 -0800 Subject: adding fix for auto linking to master too Signed-off-by: Michael Koziarski --- actionpack/lib/action_view/helpers/text_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/helpers') diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index 1d92bcb763..be15e227b9 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -567,7 +567,7 @@ module ActionView end link_text = block_given?? yield(href) : href - href = 'http://' + href unless href.index('http') == 0 + href = 'http://' + href unless href =~ %r{^[a-z]+://}i content_tag(:a, h(link_text), link_attributes.merge('href' => href)) + punctuation.reverse.join('') end -- cgit v1.2.3