diff options
author | Go MAEDA <maeda@farend.jp> | 2019-03-03 15:18:04 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-03-03 15:18:04 +0000 |
commit | 193b02567b1d889324d8709547b135e14f80d837 (patch) | |
tree | d71db95aecaad0d50e785505197033c299a84eef /test/helpers/application_helper_test.rb | |
parent | 3c85ee43faab2afbf15cb9ef0d9ccb053ea2c382 (diff) | |
download | redmine-193b02567b1d889324d8709547b135e14f80d837.tar.gz redmine-193b02567b1d889324d8709547b135e14f80d837.zip |
URLs end with "-" are rendered incorrectly in Textile (#30259).
Patch by Yuichi HARADA.
git-svn-id: http://svn.redmine.org/redmine/trunk@17917 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/helpers/application_helper_test.rb')
-rw-r--r-- | test/helpers/application_helper_test.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index 26ca772b7..bfefc1052 100644 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -94,6 +94,8 @@ class ApplicationHelperTest < Redmine::HelperTest 'http://' => 'http://', 'www.' => 'www.', 'test-www.bar.com' => 'test-www.bar.com', + # ends with a hyphen + 'http://www.redmine.org/example-' => '<a class="external" href="http://www.redmine.org/example-">http://www.redmine.org/example-</a>', } to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) } end @@ -270,7 +272,10 @@ RAW '"a link":http://example.net/path!602815048C7B5C20!302.html' => '<a href="http://example.net/path!602815048C7B5C20!302.html" class="external">a link</a>', # escaping '"test":http://foo"bar' => '<a href="http://foo"bar" class="external">test</a>', - } + # ends with a hyphen + '(see "inline link":http://www.foo.bar/Test-)' => '(see <a href="http://www.foo.bar/Test-" class="external">inline link</a>)', + 'http://foo.bar/page?p=1&t=z&s=-' => '<a class="external" href="http://foo.bar/page?p=1&t=z&s=-">http://foo.bar/page?p=1&t=z&s=-</a>', + 'This is an intern "link":/foo/bar-' => 'This is an intern <a href="/foo/bar-">link</a>', } to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) } end |