Skip to content

Commit

Permalink
Single period on line fix (EC-Nordbund#68)
Browse files Browse the repository at this point in the history
* Encode all periods

* Removed no-op

---------

Co-authored-by: Ben Marx <[email protected]>
  • Loading branch information
level-xx and Ben Marx authored Apr 15, 2023
1 parent 03e58ce commit 6bde56f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions config/mail/encoding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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;
}
Expand Down

0 comments on commit 6bde56f

Please sign in to comment.