From 0a8e32563b42c19ca461fe6495c500c194d4f0ed Mon Sep 17 00:00:00 2001 From: Moritz Jordan Date: Thu, 8 Aug 2019 00:10:41 +0200 Subject: [PATCH] Fix Unicode bug in HTML export --- src/node/utils/ExportHelper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node/utils/ExportHelper.js b/src/node/utils/ExportHelper.js index e8d47fb2a..99921aa3b 100644 --- a/src/node/utils/ExportHelper.js +++ b/src/node/utils/ExportHelper.js @@ -77,7 +77,7 @@ exports._analyzeLine = function(text, aline, apool){ exports._encodeWhitespace = function(s){ - return s.replace(/[^\x21-\x7E\s\t\n\r]/g, function(c){ - return "&#" +c.charCodeAt(0) + ";"; + return s.replace(/[^\x21-\x7E\s\t\n\r]/gu, function(c){ + return "&#" +c.codePointAt(0) + ";"; }); };