aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/CHANGELOG2
-rw-r--r--actionpack/lib/action_view/helpers/text_helper.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index d4935278df..34e2ff6a88 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fix strip_links so that it doesn't hang on multiline <acronym> tags [Jamis Buck]
+
* Remove problematic control chars in rescue template. #5316 [Stefan Kaes]
* Make sure passed routing options are not mutated by routing code. #5314 [Blair Zajac]
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