From 69eb7f26d4e3b3c57a377a7ecdf1f20578292851 Mon Sep 17 00:00:00 2001 From: Tobias Schmidt <79580110+tbsschmdt@users.noreply.github.com> Date: Fri, 20 Aug 2021 14:53:41 +0200 Subject: [PATCH] Improve substitution of links in plain text emails In plain text emails it is common to use angle brackets as delimiters for links. With this commit the closing angle bracket will no longer be considered a part of the link. --- Classes/Dmailer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Dmailer.php b/Classes/Dmailer.php index 0028e2a88..fa2eabc50 100755 --- a/Classes/Dmailer.php +++ b/Classes/Dmailer.php @@ -1152,7 +1152,7 @@ public function substHTTPurlsInPlainText($content) $jumpUrlCounter = 1; return preg_replace_callback( - '/http[s]?:\/\/\S+/', + '/http[s]?:\/\/[^\s>]+/', function ($urlMatches) use (&$jumpUrlCounter) { $url = $urlMatches[0]; if (strpos($url, '&no_jumpurl=1') !== false) {