##// END OF EJS Templates
Leave wiki links untouched if target project doesn't exist or have no wiki....
Jean-Philippe Lang -
r2375:70efee1bc5b8
parent child
Show More
@@ -418,7 +418,7 module ApplicationHelper
418 :class => ('wiki-page' + (wiki_page ? '' : ' new')))
418 :class => ('wiki-page' + (wiki_page ? '' : ' new')))
419 else
419 else
420 # project or wiki doesn't exist
420 # project or wiki doesn't exist
421 title || page
421 all
422 end
422 end
423 else
423 else
424 all
424 all
@@ -195,6 +195,9 class ApplicationHelperTest < HelperTestCase
195 '-[[Another page|Page]] link-' => '<del><a href="/projects/ecookbook/wiki/Another_page" class="wiki-page">Page</a> link</del>',
195 '-[[Another page|Page]] link-' => '<del><a href="/projects/ecookbook/wiki/Another_page" class="wiki-page">Page</a> link</del>',
196 # escaping
196 # escaping
197 '![[Another page|Page]]' => '[[Another page|Page]]',
197 '![[Another page|Page]]' => '[[Another page|Page]]',
198 # project does not exist
199 '[[unknowproject:Start]]' => '[[unknowproject:Start]]',
200 '[[unknowproject:Start|Page title]]' => '[[unknowproject:Start|Page title]]',
198 }
201 }
199 @project = Project.find(1)
202 @project = Project.find(1)
200 to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
203 to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
General Comments 0
You need to be logged in to leave comments. Login now