diff --git a/lib/eml-format.js b/lib/eml-format.js index 575e557..2ceef22 100644 --- a/lib/eml-format.js +++ b/lib/eml-format.js @@ -173,10 +173,10 @@ var emlformat = { //Convert =0D to '\r', =20 to ' ', etc. if (!charset || charset == "utf8" || charset == "utf-8") { return s + .replace(/=\r?\n/gi, "") //Join line .replace(/=([\w\d]{2})=([\w\d]{2})=([\w\d]{2})/gi, function(matcher, p1, p2, p3, offset, string) { return Buffer.from([ parseInt(p1, 16), parseInt(p2, 16), parseInt(p3, 16) ]).toString("utf8"); }) .replace(/=([\w\d]{2})=([\w\d]{2})/gi, function(matcher, p1, p2, offset, string) { return Buffer.from([ parseInt(p1, 16), parseInt(p2, 16) ]).toString("utf8"); }) - .replace(/=([\w\d]{2})/gi, function(matcher, p1, offset, string) { return String.fromCharCode(parseInt(p1, 16)); }) - .replace(/=\r?\n/gi, ""); //Join line + .replace(/=([\w\d]{2})/gi, function(matcher, p1, offset, string) { return String.fromCharCode(parseInt(p1, 16)); }); } else { return s