diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-05-08 07:03:00 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-05-08 07:03:00 +0000 |
commit | c4374cb960a08054bf6b92d375bc8ba9afd6c094 (patch) | |
tree | de8e8dc2eec449eda67f1a3debe272798dc89738 /test | |
parent | 3568b3729c6bfff9d2e1e1767d7807393fbbbb7f (diff) | |
download | redmine-c4374cb960a08054bf6b92d375bc8ba9afd6c094.tar.gz redmine-c4374cb960a08054bf6b92d375bc8ba9afd6c094.zip |
Email addresses with slashes are not linked correctly (#19735).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@14237 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/lib/redmine/wiki_formatting_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/wiki_formatting_test.rb b/test/unit/lib/redmine/wiki_formatting_test.rb index 413905db9..cd7f40e73 100644 --- a/test/unit/lib/redmine/wiki_formatting_test.rb +++ b/test/unit/lib/redmine/wiki_formatting_test.rb @@ -48,6 +48,12 @@ EXPECTED assert_equal expected.gsub(%r{[\r\n\t]}, ''), Redmine::WikiFormatting::NullFormatter::Formatter.new(raw).to_html.gsub(%r{[\r\n\t]}, '') end + def test_should_link_email_with_slashes + raw = 'foo/bar@example.net' + expected = '<p><a class="email" href="mailto:foo/bar@example.net">foo/bar@example.net</a></p>' + assert_equal expected.gsub(%r{[\r\n\t]}, ''), Redmine::WikiFormatting::NullFormatter::Formatter.new(raw).to_html.gsub(%r{[\r\n\t]}, '') + end + def test_links_separated_with_line_break_should_link raw = <<-DIFF link: https://www.redmine.org |