@@ -819,6 +819,7 module ApplicationHelper | |||||
819 | elsif sep == ':' |
|
819 | elsif sep == ':' | |
820 | # removes the double quotes if any |
|
820 | # removes the double quotes if any | |
821 | name = identifier.gsub(%r{^"(.*)"$}, "\\1") |
|
821 | name = identifier.gsub(%r{^"(.*)"$}, "\\1") | |
|
822 | name = CGI.unescapeHTML(name) | |||
822 | case prefix |
|
823 | case prefix | |
823 | when 'document' |
|
824 | when 'document' | |
824 | if project && document = project.documents.visible.find_by_title(name) |
|
825 | if project && document = project.documents.visible.find_by_title(name) |
@@ -436,6 +436,14 RAW | |||||
436 | end |
|
436 | end | |
437 | end |
|
437 | end | |
438 |
|
438 | |||
|
439 | def test_redmine_links_by_name_should_work_with_html_escaped_characters | |||
|
440 | v = Version.generate!(:name => "Test & Show.txt", :project_id => 1) | |||
|
441 | link = link_to("Test & Show.txt", "/versions/#{v.id}", :class => "version") | |||
|
442 | ||||
|
443 | @project = v.project | |||
|
444 | assert_equal "<p>#{link}</p>", textilizable('version:"Test & Show.txt"') | |||
|
445 | end | |||
|
446 | ||||
439 | def test_link_to_issue_subject |
|
447 | def test_link_to_issue_subject | |
440 | issue = Issue.generate!(:subject => "01234567890123456789") |
|
448 | issue = Issue.generate!(:subject => "01234567890123456789") | |
441 | str = link_to_issue(issue, :truncate => 10) |
|
449 | str = link_to_issue(issue, :truncate => 10) |
General Comments 0
You need to be logged in to leave comments.
Login now