From 0cbb13d8fab0c30e418c4aa3327e4eec4a5ffe6d Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 7 Nov 2011 20:00:46 +0100 Subject: [PATCH] removed json_encode call in Twig_Error when the filename is a string (to avoid the escaping of /) --- lib/Twig/Error.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/Twig/Error.php b/lib/Twig/Error.php index ed0836c..8c1c54b 100644 --- a/lib/Twig/Error.php +++ b/lib/Twig/Error.php @@ -132,7 +132,7 @@ class Twig_Error extends Exception } if (null !== $this->filename) { - $this->message .= sprintf(' in %s', json_encode($this->filename)); + $this->message .= sprintf(' in %s', is_string($this->filename) ? '"'.$this->filename.'"' : json_encode($this->filename)); } if ($this->lineno >= 0) { -- 1.7.2.5