aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2006-06-08 17:19:58 +0000
committerJamis Buck <jamis@37signals.com>2006-06-08 17:19:58 +0000
commit486af0254a3abbecb6a9ca8cf32c01c7160c4078 (patch)
tree4d7e7aa7a79a86651e95c678de323e07fc1ea51e /actionpack/lib/action_view
parent38efc32529b69404dc9e40939fc582db4c02aede (diff)
downloadrails-486af0254a3abbecb6a9ca8cf32c01c7160c4078.tar.gz
rails-486af0254a3abbecb6a9ca8cf32c01c7160c4078.tar.bz2
rails-486af0254a3abbecb6a9ca8cf32c01c7160c4078.zip
Fix strip_links so that it doesn't hang on multi-line acronym tags
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4446 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view')
-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 a777c64ecc..2040c52a71 100644
--- a/actionpack/lib/action_view/helpers/text_helper.rb
+++ b/actionpack/lib/action_view/helpers/text_helper.rb
@@ -152,7 +152,7 @@ module ActionView
# Turns all links into words, like "<a href="something">else</a>" to "else".
def strip_links(text)
- text.gsub(/<a.*>(.*)<\/a>/m, '\1')
+ text.gsub(/<a\b.*?>(.*?)<\/a>/m, '\1')
end
# Try to require the html-scanner library