From fc0412d50a1f2ca7e3edf4a4c702a3eee3bfb8a3 Mon Sep 17 00:00:00 2001 From: Anonymous Contributor Date: Wed, 6 Sep 2023 17:35:56 +0200 Subject: [PATCH] Strip all tags from plaintext mail --- app/util/SmtpClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/util/SmtpClient.php b/app/util/SmtpClient.php index d7e0537..7f940ac 100644 --- a/app/util/SmtpClient.php +++ b/app/util/SmtpClient.php @@ -55,7 +55,7 @@ class SmtpClient private static function htmlToPlain($message): string { $messageNew = str_replace('
', "\n", $message); - $messageNew = preg_replace('/(.*)<\\/a>/', "$2: $1", $messageNew); + $messageNew = strip_tags(preg_replace('/(.*)<\\/a>/', "$2: $1", $messageNew)); return $messageNew; }