Skip to content

Commit aa38d42

Browse files
author
Glen Mailer
committedJan 31, 2021
Bump ansi/html encoding deps
1 parent 2c31df1 commit aa38d42

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed
 

‎client-overlay.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,12 @@ var colors = {
3535
darkgrey: '6d7891',
3636
};
3737

38-
var Entities = require('html-entities').AllHtmlEntities;
39-
var entities = new Entities();
38+
var {encode: htmlEncode} = require('html-entities');
4039

4140
function showProblems(type, lines) {
4241
clientOverlay.innerHTML = '';
4342
lines.forEach(function (msg) {
44-
msg = ansiHTML(entities.encode(msg));
43+
msg = ansiHTML(htmlEncode(msg));
4544
var div = document.createElement('div');
4645
div.style.marginBottom = '26px';
4746
div.innerHTML = problemType(type) + ' in ' + msg;

‎example/server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ app.get('/multientry', function (req, res) {
4848

4949
if (require.main === module) {
5050
var server = http.createServer(app);
51-
server.listen(process.env.PORT || 1616, function () {
51+
server.listen(process.env.PORT || 1616, "localhost", function () {
5252
console.log('Listening on %j', server.address());
5353
});
5454
}

‎package-lock.json

+10-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
"license": "MIT",
2828
"dependencies": {
2929
"ansi-html": "0.0.7",
30-
"html-entities": "^1.2.0",
30+
"html-entities": "^2.1.0",
3131
"querystring": "^0.2.0",
32-
"strip-ansi": "^3.0.0"
32+
"strip-ansi": "^6.0.0"
3333
},
3434
"devDependencies": {
3535
"eslint": "^7.19.0",

0 commit comments

Comments
 (0)
Please sign in to comment.