From c554a9cabaa3c8bbed5a0dccb381fdc6d516972d Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 26 Sep 2006 16:26:00 +0000 Subject: [PATCH] strip_links is case-insensitive. Closes #6285. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5191 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 2 ++ actionpack/lib/action_view/helpers/text_helper.rb | 2 +- actionpack/test/template/text_helper_test.rb | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index bd52be4968..a66c43b850 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -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] diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index 9d8921bf86..27e093a1c3 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 "else" to "else". def strip_links(text) - text.gsub(/(.*?)<\/a>/m, '\1') + text.gsub(/(.*?)<\/a>/mi, '\1') end # Try to require the html-scanner library diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb index 850175109a..a3962095ae 100644 --- a/actionpack/test/template/text_helper_test.rb +++ b/actionpack/test/template/text_helper_test.rb @@ -51,6 +51,7 @@ class TextHelperTest < Test::Unit::TestCase def test_strip_links assert_equal "on my mind", strip_links("on my mind") + assert_equal "on my mind", strip_links("on my mind") end def test_highlighter