Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request mochajs#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 committed Jan 8, 2017
2 parents c8ba634 + 06e4fae commit 52b6572
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
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
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 52b6572

Please sign in to comment.