Skip to content

Commit

Permalink
Merge pull request #2662 from rotemdan/replace_unicode_chars
Browse files Browse the repository at this point in the history
Replaced embedded unicode characters in html reporter with their hex encoded equivalents
  • Loading branch information
Munter authored Jan 8, 2017
2 parents 0fd44d8 + 4de2df4 commit de81203
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/reporters/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ function HTML (runner) {
runner.on('pass', function (test) {
var url = self.testURL(test);
var markup = '<li class="test pass %e"><h2>%e<span class="duration">%ems</span> ' +
'<a href="%s" class="replay"></a></h2></li>';
'<a href="%s" class="replay">&#x2023;</a></h2></li>';
var el = fragment(markup, test.speed, test.title, test.duration, url);
self.addCodeToggle(el, test.body);
appendToStack(el);
updateStats();
});

runner.on('fail', function (test) {
var el = fragment('<li class="test fail"><h2>%e <a href="%e" class="replay"></a></h2></li>',
var el = fragment('<li class="test fail"><h2>%e <a href="%e" class="replay">&#x2023;</a></h2></li>',
test.title, self.testURL(test));
var stackString; // Note: Includes leading newline
var message = test.err.toString();
Expand Down
4 changes: 2 additions & 2 deletions mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -2705,15 +2705,15 @@ function HTML (runner) {
runner.on('pass', function (test) {
var url = self.testURL(test);
var markup = '<li class="test pass %e"><h2>%e<span class="duration">%ems</span> ' +
'<a href="%s" class="replay"></a></h2></li>';
'<a href="%s" class="replay">&#x2023;</a></h2></li>';
var el = fragment(markup, test.speed, test.title, test.duration, url);
self.addCodeToggle(el, test.body);
appendToStack(el);
updateStats();
});

runner.on('fail', function (test) {
var el = fragment('<li class="test fail"><h2>%e <a href="%e" class="replay"></a></h2></li>',
var el = fragment('<li class="test fail"><h2>%e <a href="%e" class="replay">&#x2023;</a></h2></li>',
test.title, self.testURL(test));
var stackString; // Note: Includes leading newline
var message = test.err.toString();
Expand Down

0 comments on commit de81203

Please sign in to comment.