George S. Baugh 3 年之前
父節點
當前提交
5554875e9f
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      lib/Trog/Routes/HTML.pm

+ 3 - 1
lib/Trog/Routes/HTML.pm

@@ -1235,7 +1235,9 @@ sub themed_render ($template, $data) {
     );
     state $child_renderer = sub {
         my ($template_string, $options) = @_;
-        return $child_processor->render_string($template_string,$options);
+        # If it fails to render, it must be something else
+        my $out = eval { $child_processor->render_string($template_string,$options) };
+        return $out ? $out : $template_string;
     };
 
     state $processor = Text::Xslate->new(