From c3d5d0ec63dee952e19e5c523cd3e87f5a32e65d Mon Sep 17 00:00:00 2001 From: Philipp Dieter Date: Sun, 19 Dec 2021 17:40:40 +0100 Subject: [PATCH] [TASK] Hide link text in text mails if duplicates target --- Classes/Utility/MailUtility.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Classes/Utility/MailUtility.php b/Classes/Utility/MailUtility.php index 638386d..03ac344 100644 --- a/Classes/Utility/MailUtility.php +++ b/Classes/Utility/MailUtility.php @@ -233,6 +233,11 @@ class MailUtility return preg_replace_callback( '/\[(\S*)\s(.*)\]/mU', function($matchesInner) { + if ( + $matchesInner[2] == $matchesInner[1] + ) { + return $matchesInner[1]; + } return $matchesInner[2] . ': ' . $matchesInner[1];