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