From 8245eaa9f3bcb2ca54820e641e659dc7d2d73263 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 9 Mar 2013 09:17:37 +0000 Subject: [PATCH] Merged r11474 from trunk (#10277). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.3-stable@11566 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/wiki_formatting.rb | 2 +- test/unit/helpers/application_helper_test.rb | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/redmine/wiki_formatting.rb b/lib/redmine/wiki_formatting.rb index 2a3023a09..9a62bf6b8 100644 --- a/lib/redmine/wiki_formatting.rb +++ b/lib/redmine/wiki_formatting.rb @@ -86,7 +86,7 @@ module Redmine AUTO_LINK_RE = %r{ ( # leading text <\w+.*?>| # leading HTML tag, or - [^=<>!:'"/]| # leading punctuation, or + [\s\(\[,;]| # leading punctuation, or ^ # beginning of line ) ( diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 250f3fb5a..17219cf2a 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -88,6 +88,7 @@ class ApplicationHelperTest < ActionView::TestCase # invalid urls 'http://' => 'http://', 'www.' => 'www.', + 'test-www.bar.com' => 'test-www.bar.com', } to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text) } end @@ -104,8 +105,11 @@ class ApplicationHelperTest < ActionView::TestCase end def test_auto_mailto - assert_equal '

', - textilizable('test@foo.bar') + to_test = { + 'test@foo.bar' => 'test@foo.bar', + 'test@www.foo.bar' => 'test@www.foo.bar', + } + to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text) } end def test_inline_images -- 2.39.5