Skip to content

Commit

Permalink
bug #49401 [TwigBridge] Fix raw content rendering in HTML notificatio…
Browse files Browse the repository at this point in the history
…n emails (1ed)

This PR was merged into the 5.4 branch.

Discussion
----------

[TwigBridge] Fix raw content rendering in HTML notification emails

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        |

Applying nl2br on raw HTML seems wrong to me and it also makes raw ineffective.

Commits
-------

f301f1db83 [TwigBridge] Fix raw content rendering in HTML notification emails
  • Loading branch information
nicolas-grekas committed Mar 31, 2023
2 parents 355db9a + a8be6ae commit e5b1744
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Resources/views/Email/zurb_2/notification/body.html.twig
Expand Up @@ -26,7 +26,7 @@
{% if markdown %}
{{ include('@email/zurb_2/notification/content_markdown.html.twig') }}
{% else %}
{{ (raw ? content|raw : content)|nl2br }}
{{ raw ? content|raw : content|nl2br }}
{% endif %}
{% endblock %}

Expand Down

0 comments on commit e5b1744

Please sign in to comment.