Skip to content

Commit

Permalink
remove ansi escape sequences from escaped output (fixes #4526)
Browse files Browse the repository at this point in the history
  • Loading branch information
trieloff committed Dec 2, 2020
1 parent bc8ce05 commit 717474a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ exports.inherits = util.inherits;
* @return {string}
*/
exports.escape = function(html) {
return he.encode(String(html), {useNamedReferences: false});
return he
.encode(String(html), {useNamedReferences: false})
.replace(//g, '');
};

/**
Expand Down

0 comments on commit 717474a

Please # to comment.