aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers
diff options
context:
space:
mode:
authorZach Brock <zbrock@gmail.com>2009-11-24 23:51:51 -0800
committerMichael Koziarski <michael@koziarski.com>2010-01-05 10:57:20 +1300
commit79438b46382aa08ea83d740247eb16365e6d2327 (patch)
tree2b03ebad4c612392e1dc9bc59d64a0f38a6d5d66 /actionpack/lib/action_view/helpers
parentae270f597decb66444d91b27509c7dc1fc24a6b6 (diff)
downloadrails-79438b46382aa08ea83d740247eb16365e6d2327.tar.gz
rails-79438b46382aa08ea83d740247eb16365e6d2327.tar.bz2
rails-79438b46382aa08ea83d740247eb16365e6d2327.zip
adding fix for auto linking to master too
Signed-off-by: Michael Koziarski <michael@koziarski.com>
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-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 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