]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/inline.pm
bugfixes
[git.ikiwiki.info.git] / IkiWiki / Plugin / inline.pm
index 0436497420489a93964cdfc47d31abc34a17b9e2..95fe9031256f3050c0902932b91e7b1e0e9570a5 100644 (file)
@@ -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"), $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'));