mirror of
https://github.com/github/rails.git
synced 2026-02-03 02:35:08 -05:00
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
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user