You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Debug] More compact HTML
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This patch makes the HTML output for exception stack traces slightly more compact. This makes the stack trace a bit more readable when inspecting the HTML source, e.g. when using cURL.
1. Vendor-specific prefixes for border-radius are removed. They are not relevant [in any modern browser](http://caniuse.com/border-radius).
2. The ondblclick is now added only once and relies on event bubbling rather than being added to every `<li>` in the stack trace.
3. Single quotes are not escaped. Escaping single quotes is only required for values enclosed in single quoted HTML attributes - all our attributes are double-quoted.
Commits
-------
9613b75 [Debug] More compact HTML
@@ -343,7 +333,7 @@ private function decorate($content, $css)
343
333
$css
344
334
</style>
345
335
</head>
346
-
<body>
336
+
<body ondblclick="var t = event.target; if (t.title && !t.href) { var f = t.innerHTML; t.innerHTML = t.title; t.title = f; }">
347
337
$content
348
338
</body>
349
339
</html>
@@ -368,7 +358,7 @@ private function formatPath($path, $line)
368
358
returnsprintf(' in <a href="%s" title="Go to source">%s line %d</a>', $link, $file, $line);
369
359
}
370
360
371
-
returnsprintf(' in <a title="%s line %3$d" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">%s line %d</a>', $path, $file, $line);
361
+
returnsprintf(' in <a title="%s line %3$d">%s line %d</a>', $path, $file, $line);
372
362
}
373
363
374
364
/**
@@ -409,6 +399,6 @@ private function formatArgs(array $args)
0 commit comments