Skip to content

[TwigBundle] fix rendering exception stack traces #26922

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% if exception.trace|length %}
<pre class="stacktrace">
{{ exception.class }}:
{% if exception.message is not empty %}
{{- exception.message }}
Expand All @@ -8,5 +7,4 @@
{% for trace in exception.trace %}
{{ include('@Twig/Exception/trace.txt.twig', { trace: trace }, with_context = false) }}
{% endfor %}
</pre>
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@
<tbody id="trace-text-{{ index }}">
<tr>
<td>
{{ include('@Twig/Exception/traces.txt.twig', { exception: exception }, with_context = false) }}
{% if exception.trace|length %}
<pre class="stacktrace">
{%- filter escape('html') -%}
{{- include('@Twig/Exception/traces.txt.twig', { exception: exception, format: 'html' }, with_context = false) }}
{% endfilter %}
</pre>
{% endif %}
</td>
</tr>
</tbody>
Expand Down