diff --git a/mail-to-pdf.mjs b/mail-to-pdf.mjs index 59d9092..0c25fe2 100755 --- a/mail-to-pdf.mjs +++ b/mail-to-pdf.mjs @@ -47,15 +47,11 @@ if (!html.includes("`; } -if ( - html.includes( - `` - ) -) { - html = html.replace( - ``, - "" - ); +for (const str_to_remove of [ + ``, + ``, +]) { + html = html.replace(str_to_remove, ""); } if (!html.includes(`/i, + /]*>/i, `` + /* HTML */ `

${subject}