From f11eb6406da192adaf692716c6d96ffa5f3d1365 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Mon, 7 Mar 2022 14:44:48 -0800 Subject: [PATCH] Remove special characters from Autohouse export. --- server/data/autohouse.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/server/data/autohouse.js b/server/data/autohouse.js index 46b4e2d6d..1dc159cb1 100644 --- a/server/data/autohouse.js +++ b/server/data/autohouse.js @@ -124,12 +124,12 @@ exports.default = async (req, res) => { } } - // for (const xmlObj of allxmlsToUpload) { - // fs.writeFileSync(`./logs/${xmlObj.filename}`, xmlObj.xml); - // } + for (const xmlObj of allxmlsToUpload) { + fs.writeFileSync(`./logs/${xmlObj.filename}`, xmlObj.xml); + } - // res.json(allxmlsToUpload); - // return; + res.json(allxmlsToUpload); + return; let sftp = new Client(); sftp.on("error", (errors) => @@ -822,7 +822,9 @@ const GenerateDetailLines = (job, line, statuses) => { )) || 0, //Critical: null, - Description: line.line_desc || "", + Description: line.line_desc + ? line.line_desc.replace(/[^\x00-\x7F]/g, "") + : "", DiscountMarkup: line.prt_dsmk_m || 0, InvoiceNumber: line.billlines[0] && line.billlines[0].bill.invoice_number, IOUPart: 0,