Skip to content

Commit

Permalink
Escape the stacktrace output before setting it as innerHTML, since it…
Browse files Browse the repository at this point in the history
… tends to contain `<` and `>` characters.
  • Loading branch information
mathiasbynens committed May 27, 2011
1 parent 3efbca0 commit d4f23f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qunit/qunit.js
Expand Up @@ -625,7 +625,7 @@ extend(QUnit, {
var source = sourceFromStacktrace();
if (source) {
details.source = source;
output += '<tr class="test-source"><th>Source: </th><td><pre>' + source +'</pre></td></tr>';
output += '<tr class="test-source"><th>Source: </th><td><pre>' + escapeHtml(source) + '</pre></td></tr>';
}
}
output += "</table>";
Expand Down

0 comments on commit d4f23f8

Please sign in to comment.