Skip to content

Commit 43d2a91

Browse files
committed
Fix merge tags & replacers
1 parent 1b729fe commit 43d2a91

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

resources/views/unlayer.blade.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ function loadTemplate() {
9595
}).then(data => done({ progress: 100, url: data.file.url }))
9696
});
9797
98-
const mergeTags = {};
98+
const mergeTags = [];
9999
@foreach ($replacers as $replacerName => $replacerDescription)
100-
mergeTags["{{ $replacerName }}"] = {
101-
name: "{{ $replacerName }}",
102-
value: '@{{' + "{{ $replacerName }}" + '}}'
103-
};
100+
mergeTags.push({
101+
name: "{!! $replacerName !!}",
102+
value: '@{{' + "{!! $replacerName !!}" + '}}'
103+
});
104104
@endforeach
105105
106106
unlayer.setMergeTags(mergeTags);

src/UnlayerEditor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ private function getSpecialLinks(HasHtmlContent $model): array
8787
$tags->each(function (Tag $tag) use (&$unsubscribeLinks) {
8888
$unsubscribeLinks[] = [
8989
'name' => $tag->name,
90-
'href' => "{{unsubscribeTag['{$tag->name}']",
90+
'href' => "{{unsubscribeTag['{$tag->name}']}}",
9191
'target' => '_blank',
9292
];
9393
});

0 commit comments

Comments
 (0)