Sfoglia il codice sorgente

[FrameworkBundle] removed the need for decorating with SafeDecorator

Fabien Potencier 14 anni fa
parent
commit
2b613f34d5

+ 1 - 1
src/Symfony/Bundle/FrameworkBundle/Controller/ExceptionController.php

@@ -49,7 +49,7 @@ class ExceptionController extends ContainerAware
         $response = $this->container->get('templating')->renderResponse(
             'FrameworkBundle:Exception:'.($this->container->get('kernel')->isDebug() ? 'exception.php' : 'error.php'),
             array(
-                'exception'      => new SafeDecorator($exception),
+                'exception'      => $exception,
                 'logger'         => $logger,
                 'currentContent' => $currentContent,
                 'embedded'       => $embedded,

File diff suppressed because it is too large
+ 1 - 1
src/Symfony/Bundle/FrameworkBundle/Resources/views/Exception/exception.php


+ 1 - 1
src/Symfony/Bundle/FrameworkBundle/Resources/views/Exception/layout.php

@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     <head>
         <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $view->getCharset() ?>"/>
-        <title><?php echo htmlspecialchars($exception->getMessage(), ENT_QUOTES, $view->getCharset()) ?> (<?php echo $exception->getStatusCode() ?> <?php echo $exception->getStatusText() ?>)</title>
+        <title><?php echo $exception->getMessage() ?> (<?php echo $exception->getStatusCode() ?> <?php echo $exception->getStatusText() ?>)</title>
         <style type="text/css">
             html { background: #eee }
             body { font: 11px Verdana, Arial, sans-serif; color: #333 }

+ 1 - 1
src/Symfony/Bundle/FrameworkBundle/Resources/views/Exception/traces.php

@@ -2,7 +2,7 @@
     <?php if ($count > 0): ?>
         <h3>
             <span><?php echo $count - $position + 1 ?>/<?php echo $count + 1 ?></span>
-            <?php echo $view->get('code')->abbrClass($exception->getClass()) ?>: <?php echo str_replace("\n", '<br />', htmlspecialchars($exception->getMessage(), ENT_QUOTES, $view->getCharset())) ?>
+            <?php echo $view->get('code')->abbrClass($exception->getClass()) ?>: <?php echo str_replace("\n", '<br />', $exception->getMessage()) ?>
             <a href="#" onclick="toggle('traces_<?php echo $position ?>', 'traces'); return false;">&raquo;</a><br />
         </h3>
     <?php else: ?>