X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/011d88052d6dacb6a9d84b1489d37eefeb992da1..a1575b0c8398f3ebb70b2364b986964fb354e09a:/IkiWiki/Plugin/inline.pm diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 2d47cb4be..95fe90312 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -329,12 +329,17 @@ sub preprocess_inline (@) { if (! $feedonly) { my $template; if (! $raw) { + # cannot use wiki pages as templates; template not sanitized due to + # format hook hack eval { $template=template_depends($params{template}.".tmpl", $params{page}, blind_cache => 1); }; - if ($@ || ! $template) { - error sprintf(gettext("nonexistant template %s.tmpl"), $params{template}); + if ($@) { + error gettext("failed to process template:")." $@"; + } + if (! $template) { + error sprintf(gettext("template %s not found"), $params{template}.".tmpl"); } } my $needcontent=$raw || (!($archive && $quick) && $template->query(name => 'content'));