diff --git a/src/Module/Special/HTTPException.php b/src/Module/Special/HTTPException.php index 9c9a29c55..8a8cc30eb 100644 --- a/src/Module/Special/HTTPException.php +++ b/src/Module/Special/HTTPException.php @@ -104,6 +104,7 @@ class HTTPException $tpl = Renderer::getMarkupTemplate('http_status.tpl'); $content = Renderer::replaceMacros($tpl, $vars); } catch (\Exception $e) { + $vars = array_map('htmlentities', $vars); $content = "
{$vars['$message']}
"; if ($this->isSiteAdmin) { $content .= "{$vars['$thrown']}
"; diff --git a/view/templates/exception.tpl b/view/templates/exception.tpl index 3499a5cb1..cdeb6d96f 100644 --- a/view/templates/exception.tpl +++ b/view/templates/exception.tpl @@ -1,7 +1,7 @@{{$message nofilter}}
+{{$message}}
{{if $thrown}}{{$thrown}} {{$stack_trace}} diff --git a/view/templates/http_status.tpl b/view/templates/http_status.tpl index 874bf9669..bd6ecb3a5 100644 --- a/view/templates/http_status.tpl +++ b/view/templates/http_status.tpl @@ -4,7 +4,7 @@{{$title}}
-{{$message nofilter}}
+{{$message}}
{{if $trace}}{{$trace nofilter}}{{/if}}