From d1a88c892ea1786e3f8451d0ef9069be9358e332 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 18 Oct 2009 13:47:30 -0400 Subject: edittemplate: Allow template page name to be specified using anything legal for a wikilink (including eg, leading slashes). Before, the htmllink would display the link to the template as if it were a wikilink, but what was stored was not, which could lead to confusing situations. --- IkiWiki/Plugin/edittemplate.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'IkiWiki/Plugin/edittemplate.pm') diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm index 7d2eba194..e8e7b1e04 100644 --- a/IkiWiki/Plugin/edittemplate.pm +++ b/IkiWiki/Plugin/edittemplate.pm @@ -55,7 +55,8 @@ sub preprocess (@) { } my $link=linkpage($params{template}); - $pagestate{$params{page}}{edittemplate}{$params{match}}=$link; + my $bestlink=bestlink($params{page}, $link); + $pagestate{$params{page}}{edittemplate}{$params{match}}=$bestlink; return "" if ($params{silent} && IkiWiki::yesno($params{silent})); add_depends($params{page}, $link, deptype("presence")); -- cgit v1.2.3