Don't escape already parsed wiki link title (#9471).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7698 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
e32d815def
commit
1032210edd
|
@ -592,7 +592,7 @@ module ApplicationHelper
|
|||
url_for(:only_path => only_path, :controller => 'wiki', :action => 'show', :project_id => link_project, :id => wiki_page_id, :anchor => anchor)
|
||||
end
|
||||
end
|
||||
link_to(h(title || page), url, :class => ('wiki-page' + (wiki_page ? '' : ' new')))
|
||||
link_to(title || h(page), url, :class => ('wiki-page' + (wiki_page ? '' : ' new')))
|
||||
else
|
||||
# project or wiki doesn't exist
|
||||
all.html_safe
|
||||
|
|
|
@ -350,6 +350,9 @@ RAW
|
|||
to_test = {
|
||||
'[[CookBook documentation]]' => '<a href="/projects/ecookbook/wiki/CookBook_documentation" class="wiki-page">CookBook documentation</a>',
|
||||
'[[Another page|Page]]' => '<a href="/projects/ecookbook/wiki/Another_page" class="wiki-page">Page</a>',
|
||||
# title content should be formatted
|
||||
'[[Another page|With _styled_ *title*]]' => '<a href="/projects/ecookbook/wiki/Another_page" class="wiki-page">With <em>styled</em> <strong>title</strong></a>',
|
||||
'[[Another page|With title containing <strong>HTML entities & markups</strong>]]' => '<a href="/projects/ecookbook/wiki/Another_page" class="wiki-page">With title containing <strong>HTML entities & markups</strong></a>',
|
||||
# link with anchor
|
||||
'[[CookBook documentation#One-section]]' => '<a href="/projects/ecookbook/wiki/CookBook_documentation#One-section" class="wiki-page">CookBook documentation</a>',
|
||||
'[[Another page#anchor|Page]]' => '<a href="/projects/ecookbook/wiki/Another_page#anchor" class="wiki-page">Page</a>',
|
||||
|
@ -371,6 +374,7 @@ RAW
|
|||
'[[unknowproject:Start]]' => '[[unknowproject:Start]]',
|
||||
'[[unknowproject:Start|Page title]]' => '[[unknowproject:Start|Page title]]',
|
||||
}
|
||||
|
||||
@project = Project.find(1)
|
||||
to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue