bug #25232 [WebProfilerBundle] [TwigBundle] Fix Profiler breaking XHTML pages (tistre)
This PR was submitted for the master branch but it was merged into the 3.3 branch instead (closes #25232).
Discussion
----------
[WebProfilerBundle] [TwigBundle] Fix Profiler breaking XHTML pages
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Just a tiny fix: Stop the Profiler from breaking XHTML pages (served with "Content-Type: application/xhtml+xml") - with the added quotes around the nonce attribute value, the page remains well-formed XML.
Commits
-------
b1ab7d0
[WebProfilerBundle], [TwigBundle] Fix Profiler breaking XHTML pages (Content-Type: application/xhtml+xml)
This commit is contained in:
commit
61e1f5705e
@ -1,6 +1,6 @@
|
|||||||
{# This file is based on WebProfilerBundle/Resources/views/Profiler/base_js.html.twig.
|
{# This file is based on WebProfilerBundle/Resources/views/Profiler/base_js.html.twig.
|
||||||
If you make any change in this file, verify the same change is needed in the other file. #}
|
If you make any change in this file, verify the same change is needed in the other file. #}
|
||||||
<script{% if csp_script_nonce is defined and csp_script_nonce %} nonce={{ csp_script_nonce }}{% endif %}>/*<![CDATA[*/
|
<script{% if csp_script_nonce is defined and csp_script_nonce %} nonce="{{ csp_script_nonce }}"{% endif %}>/*<![CDATA[*/
|
||||||
{# Caution: the contents of this file are processed by Twig before loading
|
{# Caution: the contents of this file are processed by Twig before loading
|
||||||
them as JavaScript source code. Always use '/*' comments instead
|
them as JavaScript source code. Always use '/*' comments instead
|
||||||
of '//' comments to avoid impossible-to-debug side-effects #}
|
of '//' comments to avoid impossible-to-debug side-effects #}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{# This file is partially duplicated in TwigBundle/Resources/views/base_js.html.twig. If you
|
{# This file is partially duplicated in TwigBundle/Resources/views/base_js.html.twig. If you
|
||||||
make any change in this file, verify the same change is needed in the other file. #}
|
make any change in this file, verify the same change is needed in the other file. #}
|
||||||
<script{% if csp_script_nonce is defined and csp_script_nonce %} nonce={{ csp_script_nonce }}{% endif %}>/*<![CDATA[*/
|
<script{% if csp_script_nonce is defined and csp_script_nonce %} nonce="{{ csp_script_nonce }}"{% endif %}>/*<![CDATA[*/
|
||||||
{# Caution: the contents of this file are processed by Twig before loading
|
{# Caution: the contents of this file are processed by Twig before loading
|
||||||
them as JavaScript source code. Always use '/*' comments instead
|
them as JavaScript source code. Always use '/*' comments instead
|
||||||
of '//' comments to avoid impossible-to-debug side-effects #}
|
of '//' comments to avoid impossible-to-debug side-effects #}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<style{% if csp_style_nonce %} nonce="{{ csp_style_nonce }}"{% endif %}>
|
<style{% if csp_style_nonce %} nonce="{{ csp_style_nonce }}"{% endif %}>
|
||||||
{{ include('@WebProfiler/Profiler/toolbar.css.twig', { 'position': position, 'floatable': true }) }}
|
{{ include('@WebProfiler/Profiler/toolbar.css.twig', { 'position': position, 'floatable': true }) }}
|
||||||
</style>
|
</style>
|
||||||
<script{% if csp_script_nonce %} nonce={{ csp_script_nonce }}{% endif %}>/*<![CDATA[*/
|
<script{% if csp_script_nonce %} nonce="{{ csp_script_nonce }}"{% endif %}>/*<![CDATA[*/
|
||||||
(function () {
|
(function () {
|
||||||
{% if 'top' == position %}
|
{% if 'top' == position %}
|
||||||
var sfwdt = document.getElementById('sfwdt{{ token }}');
|
var sfwdt = document.getElementById('sfwdt{{ token }}');
|
||||||
|
Reference in New Issue
Block a user