Skip to content

Commit 376ff32

Browse files
authored
fix XSS in timeline (php-debugbar#567)
1 parent 30f65f1 commit 376ff32

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/DebugBar/Resources/widgets.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,8 @@ if (typeof(PhpDebugBar) == 'undefined') {
518518
$.each(aggregate, function(i, aggregate) {
519519
width = Math.min((aggregate.data.duration * 100 / data.duration).toFixed(2), 100);
520520

521-
aggregateTable.append('<tr><td class="' + csscls('name') + '">' + aggregate.data.count + ' x ' + aggregate.label + ' (' + width + '%)</td><td class="' + csscls('value') + '">' +
521+
aggregateTable.append('<tr><td class="' + csscls('name') + '">' +
522+
aggregate.data.count + ' x ' + $('<i />').text(aggregate.label).html() + ' (' + width + '%)</td><td class="' + csscls('value') + '">' +
522523
'<div class="' + csscls('measure') +'">' +
523524
'<span class="' + csscls('value') + '"></span>' +
524525
'<span class="' + csscls('label') + '">' + formatDuration(aggregate.data.duration) + (aggregate.data.memory ? '/' + formatBytes(aggregate.data.memory) : '') + '</span>' +

0 commit comments

Comments
 (0)