Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview error when adding Safe to template syntax #1693

Closed
waza-ari opened this issue Jan 25, 2024 · 1 comment
Closed

Preview error when adding Safe to template syntax #1693

waza-ari opened this issue Jan 25, 2024 · 1 comment
Labels
question Further information is requested

Comments

@waza-ari
Copy link

waza-ari commented Jan 25, 2024

Version:

  • listmonk: v2.5.1
  • OS: Docker (on Ubuntu 22.04)

Description of the bug and steps to reproduce:
The preview of a transactional template fails when introducing template functions such as | Safe. Not tested with others.

Create a new template, transactional, any subject. Add the following minimal template:

<!doctype html>
<html lang="de">
  <head><title>{{ .Tx.Data.subject }}</title></head>
  <body>{{ .Tx.Data.content }}</body>
</html>

Verify preview shows an empty white page. Replace it with

<!doctype html>
<html lang="de">
  <head><title>{{ .Tx.Data.subject }}</title></head>
  <body>{{ .Tx.Data.content | Safe }}</body>
</html>

Now the error message is shown instead:

{"message":"globals.messages.errorFetching: Invalid arguments"}

Note that saving the template and sending mails using this template work fine.

@knadh
Copy link
Owner

knadh commented Jan 28, 2024

Please see this: #1686

@knadh knadh closed this as completed Jan 28, 2024
@knadh knadh added the question Further information is requested label Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants