浏览代码

[TwigBundle] Fix the exception message escaping

alexandresalome 13 年之前
父节点
当前提交
f3e92c4cc1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces.html.twig

+ 1 - 1
src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces.html.twig

@@ -2,7 +2,7 @@
     {% if count > 0 %}
         <h2>
             <span><small>[{{ count - position + 1 }}/{{ count + 1 }}]</small></span>
-            {{ exception.class|abbr_class }}: {{ exception.message|replace({ "\n": '<br />' }) }}&nbsp;
+            {{ exception.class|abbr_class }}: {{ exception.message|e|replace({"\n": '<br />'})|format_file_from_text }}&nbsp;
             {% spaceless %}
             <a href="#" onclick="toggle('traces_{{ position }}', 'traces'); switchIcons('icon_traces_{{ position }}_open', 'icon_traces_{{ position }}_close'); return false;">
                 <img class="toggle" id="icon_traces_{{ position }}_close" alt="-" src="{{ asset('bundles/framework/images/blue_picto_less.gif') }}" style="visibility: {{ 0 == count ? 'display' : 'hidden' }}" />