From 437725debecef41e4eb6b7d1bcb5f52869755235 Mon Sep 17 00:00:00 2001 From: Jan van Hellemond Date: Tue, 20 Jan 2026 15:44:44 +0100 Subject: [PATCH] Escape brackets in text body Text bodies are previewed as if they were HTML. This works mostly, but no if the text contains < or >. It is common practice to wrap links in plaintext mail with <>. Currently, the preview hides these links, as the browser interprets them as (unknown) HTML tags. This fixes that. --- preview/templateText.ejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/preview/templateText.ejs b/preview/templateText.ejs index ca093dd..bd1ab4b 100644 --- a/preview/templateText.ejs +++ b/preview/templateText.ejs @@ -4,6 +4,6 @@ -
<%- body %>
+
<%- body.replaceAll("<", "<").replaceAll(">", ">") %>
- \ No newline at end of file +