diff options
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers/text_helper.rb | 2 | ||||
-rw-r--r-- | actionpack/test/template/text_helper_test.rb | 1 |
3 files changed, 4 insertions, 1 deletions
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 "<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 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("<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 |