From 395ed2e8a2358eb3c76c569bf2fddd5bd2b0ec9f Mon Sep 17 00:00:00 2001 From: Fabio Bonelli Date: Tue, 12 Apr 2022 10:49:32 +0200 Subject: [PATCH] Ignore spaces when merging subscriber's tag to a message Make both {{email}} and {{ email }} work when merging subscriber's tag to a message, in order to be consistent with other tags (fe. {{ unsubscribe_url }}). --- src/Services/Content/MergeContentService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Services/Content/MergeContentService.php b/src/Services/Content/MergeContentService.php index ac895365..10dd69d8 100644 --- a/src/Services/Content/MergeContentService.php +++ b/src/Services/Content/MergeContentService.php @@ -133,7 +133,7 @@ protected function mergeSubscriberTags(string $content, Message $message): strin ]; foreach ($tags as $key => $replace) { - $content = str_ireplace('{{' . $key . '}}', $replace, $content); + $content = str_ireplace(["{{ $key }}", "{{$key}}"], $replace, $content); } return $content;