##// END OF EJS Templates
Don't escape already parsed wiki link title (#9471)....
Etienne Massip -
r7578:1032210edd00
parent child
Show More
@@ -592,7 +592,7 module ApplicationHelper
592 592 url_for(:only_path => only_path, :controller => 'wiki', :action => 'show', :project_id => link_project, :id => wiki_page_id, :anchor => anchor)
593 593 end
594 594 end
595 link_to(h(title || page), url, :class => ('wiki-page' + (wiki_page ? '' : ' new')))
595 link_to(title || h(page), url, :class => ('wiki-page' + (wiki_page ? '' : ' new')))
596 596 else
597 597 # project or wiki doesn't exist
598 598 all.html_safe
@@ -350,6 +350,9 RAW
350 350 to_test = {
351 351 '[[CookBook documentation]]' => '<a href="/projects/ecookbook/wiki/CookBook_documentation" class="wiki-page">CookBook documentation</a>',
352 352 '[[Another page|Page]]' => '<a href="/projects/ecookbook/wiki/Another_page" class="wiki-page">Page</a>',
353 # title content should be formatted
354 '[[Another page|With _styled_ *title*]]' => '<a href="/projects/ecookbook/wiki/Another_page" class="wiki-page">With <em>styled</em> <strong>title</strong></a>',
355 '[[Another page|With title containing <strong>HTML entities &amp; markups</strong>]]' => '<a href="/projects/ecookbook/wiki/Another_page" class="wiki-page">With title containing &lt;strong&gt;HTML entities &amp; markups&lt;/strong&gt;</a>',
353 356 # link with anchor
354 357 '[[CookBook documentation#One-section]]' => '<a href="/projects/ecookbook/wiki/CookBook_documentation#One-section" class="wiki-page">CookBook documentation</a>',
355 358 '[[Another page#anchor|Page]]' => '<a href="/projects/ecookbook/wiki/Another_page#anchor" class="wiki-page">Page</a>',
@@ -371,6 +374,7 RAW
371 374 '[[unknowproject:Start]]' => '[[unknowproject:Start]]',
372 375 '[[unknowproject:Start|Page title]]' => '[[unknowproject:Start|Page title]]',
373 376 }
377
374 378 @project = Project.find(1)
375 379 to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
376 380 end
General Comments 0
You need to be logged in to leave comments. Login now