aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/text_helper.rb
diff options
context:
space:
mode:
authorKevin Glowacz <glowacz@gmail.com>2008-05-22 14:21:33 -0500
committerPratik Naik <pratiknaik@gmail.com>2008-05-22 21:10:40 +0100
commit1a73e98660b29a2ce9eccd5b0776367a4969a012 (patch)
tree11409f89e450878843adb4fcbe3c17f842f2c065 /actionpack/lib/action_view/helpers/text_helper.rb
parentcff2291df5d1df106ae8cf116655f0703f53f8c3 (diff)
downloadrails-1a73e98660b29a2ce9eccd5b0776367a4969a012.tar.gz
rails-1a73e98660b29a2ce9eccd5b0776367a4969a012.tar.bz2
rails-1a73e98660b29a2ce9eccd5b0776367a4969a012.zip
Fix auto_link helper for already linked urls. [#72 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionpack/lib/action_view/helpers/text_helper.rb')
-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 b710157f51..669a285424 100644
--- a/actionpack/lib/action_view/helpers/text_helper.rb
+++ b/actionpack/lib/action_view/helpers/text_helper.rb
@@ -454,7 +454,7 @@ module ActionView
( # leading text
<\w+.*?>| # leading HTML tag, or
[^=!:'"/]| # leading punctuation, or
- | # nothing
+ ^ # beginning of line
)
(
(?:https?://)| # protocol spec, or
@@ -468,7 +468,7 @@ module ActionView
(?:\?[\w\+@%&=.;-]+)? # query string
(?:\#[\w\-]*)? # trailing anchor
)
- ([[:punct:]]|\s|<|$) # trailing text
+ ([[:punct:]]|<|$|) # trailing text
}x unless const_defined?(:AUTO_LINK_RE)
# Turns all urls into clickable links. If a block is given, each url