Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4828350

Browse filesBrowse files
committed
[WebProfilerBundle] Fixed js escaping in time.html.twig
1 parent 9ec6a9c commit 4828350
Copy full SHA for 4828350

File tree

Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed
Filter options
  • src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector
Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed

‎src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
{% endfor %}
9292
{% endif %}
9393

94-
<script type="text/javascript">//<![CDATA[
94+
<script type="text/javascript">{% autoescape 'js' %}//<![CDATA[
9595
/**
9696
* In-memory key-value cache manager
9797
*/
@@ -428,10 +428,11 @@
428428
canvasAutoUpdateOnThresholdChange(null);
429429
}, 50);
430430
431-
//]]></script>
431+
//]]>{% endautoescape %}</script>
432432
{% endblock %}
433433

434434
{% macro dump_request_data(token, profile, events, origin) %}
435+
{% autoescape 'js' %}
435436
{% from _self import dump_events %}
436437
{
437438
"id": "{{ token }}",
@@ -440,13 +441,15 @@
440441
{{ dump_events(events) }}
441442
]
442443
}
444+
{% endautoescape %}
443445
{% endmacro %}
444446

445447
{% macro dump_events(events) %}
448+
{% autoescape 'js' %}
446449
{% for name, event in events %}
447450
{% if '__section__' != name %}
448451
{
449-
"name": "{{ name|replace({"\\": "\\\\"}) }}",
452+
"name": "{{ name }}",
450453
"category": "{{ event.category }}",
451454
"origin": {{ "%F"|format(event.origin) }},
452455
"starttime": {{ "%F"|format(event.starttime) }},
@@ -461,6 +464,7 @@
461464
}{{ loop.last ? '' : ',' }}
462465
{% endif %}
463466
{% endfor %}
467+
{% endautoescape %}
464468
{% endmacro %}
465469

466470
{% macro display_timeline(id, events, colors) %}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.