From 2af0367f75e31fa8a50c8dc50e4e17c102de5f57 Mon Sep 17 00:00:00 2001 From: asanrom Date: Tue, 30 Aug 2016 23:00:06 +0200 Subject: [PATCH] Fix crash in Text.escapeHTML --- src/tools/text.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/text.js b/src/tools/text.js index 0eb614b..5653383 100644 --- a/src/tools/text.js +++ b/src/tools/text.js @@ -61,7 +61,7 @@ exports.trim = function (str) { */ exports.escapeHTML = function (str) { if (!str) return ''; - return ('' + str).escapeHTML(); + return ('' + str).replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/\//g, '/'); }; /**