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:
parent
38efc32529
commit
486af0254a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue