replaced homegrown with package

This commit is contained in:
Wyatt Johnson
2018-01-18 14:22:19 -07:00
parent 14d035adb1
commit 49d20db26f
3 changed files with 3 additions and 19 deletions
+1
View File
@@ -92,6 +92,7 @@
"dotenv": "^4.0.0",
"ejs": "^2.5.7",
"env-rewrite": "^1.0.2",
"escape-html": "^1.0.3",
"eventemitter2": "^4.1.2",
"exports-loader": "^0.6.4",
"express": "4.16.0",
+1 -18
View File
@@ -1,21 +1,4 @@
/**
* escapeHTMLEntities will escape HTML entities with their unicode counterparts.
*
* @param {String} string the string containing potentially unsafe characters
*/
const escapeHTMLEntities = string =>
string.replace(/[<>&]/g, function(c) {
switch (c.charCodeAt(0)) {
case 0x3c:
return '\\u003c';
case 0x3e:
return '\\u003e';
case 0x26:
return '\\u0026';
default:
return c;
}
});
const escapeHTMLEntities = require('escape-html');
/**
* encodeJSONForHTML will encode an object to be loaded on an HTML page.
+1 -1
View File
@@ -2862,7 +2862,7 @@ es6-promise@^4.0.5:
version "4.1.1"
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.1.1.tgz#8811e90915d9a0dba36274f0b242dbda78f9c92a"
escape-html@~1.0.3:
escape-html@^1.0.3, escape-html@~1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"