From 6bde56f27cfda68be8baf6c82f0694ecae65ec6d Mon Sep 17 00:00:00 2001 From: level-xx Date: Sat, 15 Apr 2023 21:12:30 +0200 Subject: [PATCH] Single period on line fix (#68) * Encode all periods * Removed no-op --------- Co-authored-by: Ben Marx --- config/mail/encoding.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/mail/encoding.ts b/config/mail/encoding.ts index da01e57..f1a9e8c 100644 --- a/config/mail/encoding.ts +++ b/config/mail/encoding.ts @@ -10,7 +10,6 @@ const encoder = new TextEncoder(); * @returns encoded string */ export function quotedPrintableEncode(data: string, encLB = false) { - data.replaceAll("=", "=3D"); if (!encLB) { data = data.replaceAll(" \r\n", "=20\r\n").replaceAll(" \n", "=20\n"); @@ -23,7 +22,7 @@ export function quotedPrintableEncode(data: string, encLB = false) { if (encodedChar.length === 1) { const code = encodedChar[0]; - if (code >= 32 && code <= 126 && code !== 61) return ch; + if (code >= 32 && code <= 126 && code !== 61 && code !== 46) return ch; if (!encLB && (code === 10 || code === 13)) return ch; if (code === 9) return ch; }