Permalink
Browse files

strip_links is case-insensitive. Closes #6285.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5191 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 8255818 commit c554a9cabaa3c8bbed5a0dccb381fdc6d516972d @jeremy jeremy committed Sep 26, 2006
View
@@ -1,5 +1,7 @@
*SVN*
+* strip_links is case-insensitive. #6285 [tagoh, Bob Silva]
+
* Clear the cache of possible controllers whenever Routes are reloaded. [Nicholas Seckar]
* Filters overhaul including meantime filter support using around filters + blocks. #5949 [Martin Emde, Roman Le Negrate, Stefan Kaes, Jeremy Kemper]
@@ -152,7 +152,7 @@ def auto_link(text, link = :all, href_options = {}, &block)
# Turns all links into words, like "<a href="something">else</a>" to "else".
def strip_links(text)
- text.gsub(/<a\b.*?>(.*?)<\/a>/m, '\1')
+ text.gsub(/<a\b.*?>(.*?)<\/a>/mi, '\1')
end
# Try to require the html-scanner library
@@ -51,6 +51,7 @@ def test_truncate_multibyte_with_kcode
def test_strip_links
assert_equal "on my mind", strip_links("<a href='almost'>on my mind</a>")
+ assert_equal "on my mind", strip_links("<A href='almost'>on my mind</A>")
end
def test_highlighter

0 comments on commit c554a9c

Please sign in to comment.