Fix Unicode bug in HTML export

This commit is contained in:
Moritz Jordan 2019-08-08 00:10:41 +02:00 committed by muxator
parent 161a38efd2
commit 0a8e32563b
1 changed files with 2 additions and 2 deletions

View File

@ -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) + ";";
});
};