Skip to content

Commit

Permalink
minor #13687 [WebProfilerBundle] fix html lint on empty onclick (jrob…
Browse files Browse the repository at this point in the history
…eson)

This PR was merged into the 2.3 branch.

Discussion
----------

[WebProfilerBundle] fix html lint on empty onclick

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

The request collector has an empty onclick="" attribute
when {{ link }} isn't available. This tends to happen when
rendering the debug toolbar.

Commits
-------

a3a2f15 [WebProfilerBundle] fix html linting on empty onclick
  • Loading branch information
fabpot committed Feb 16, 2015
2 parents 90b028b + a3a2f15 commit def4fd5
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -5,7 +5,7 @@
{% if collector.controller.class is defined %}
{% set link = collector.controller.file|file_link(collector.controller.line) %}
<span class="sf-toolbar-info-class sf-toolbar-info-with-next-pointer">{{ collector.controller.class|abbr_class }}</span>
<span class="sf-toolbar-info-method" onclick="{% if link %}window.location='{{link|e('js')}}';window.event.stopPropagation();return false;{% endif %}">
<span class="sf-toolbar-info-method"{% if link %} onclick="window.location='{{link|e('js')}}';window.event.stopPropagation();return false;"{% endif %}>
{{ collector.controller.method }}
</span>
{% else %}
Expand Down

0 comments on commit def4fd5

Please sign in to comment.