Skip to content

Commit a3a2f15

Browse files
author
Johnny Robeson
committed
[WebProfilerBundle] fix html linting on empty onclick
The request collector has an empty onclick="" attribute when {{ link }} isn't available. This tends to happen when rendering the debug toolbar.
1 parent f77d710 commit a3a2f15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{% if collector.controller.class is defined %}
66
{% set link = collector.controller.file|file_link(collector.controller.line) %}
77
<span class="sf-toolbar-info-class sf-toolbar-info-with-next-pointer">{{ collector.controller.class|abbr_class }}</span>
8-
<span class="sf-toolbar-info-method" onclick="{% if link %}window.location='{{link|e('js')}}';window.event.stopPropagation();return false;{% endif %}">
8+
<span class="sf-toolbar-info-method"{% if link %} onclick="window.location='{{link|e('js')}}';window.event.stopPropagation();return false;"{% endif %}>
99
{{ collector.controller.method }}
1010
</span>
1111
{% else %}

0 commit comments

Comments
 (0)