From 0e4a54328ac333238af4c58c8af5ebc30273821e Mon Sep 17 00:00:00 2001 From: Peter 'Pita' Martischka Date: Wed, 10 Aug 2011 17:48:36 +0100 Subject: [PATCH] fixed #61 --- node/utils/ExportHtml.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/node/utils/ExportHtml.js b/node/utils/ExportHtml.js index 4cd4bbee..dce156ec 100644 --- a/node/utils/ExportHtml.js +++ b/node/utils/ExportHtml.js @@ -402,10 +402,16 @@ function _escapeHTML(s) '>': '>', }; } - return s.replace(re, function (c) + + s = s.replace(re, function (c) { return re.MAP[c]; }); + + return s.replace(/[^\x21-\x7E\s\t\n\r]/g, function(c) + { + return "&#" +c.charCodeAt(0) + ";" + }); } // copied from ACE