shopware / shopware

Shopware 6 is an open commerce platform based on Symfony Framework and Vue and supported by a worldwide community and more than 1.500 community extensions
https://shopware.com
MIT License
2.7k stars 986 forks source link

Twig variables get escaped inside some HTML-tag attributes in header & footer E-Mail templates #3203

Open Dead-Man-Walker opened 1 year ago

Dead-Man-Walker commented 1 year ago

PHP Version

8.1

Shopware Version

6.5.3.0

Expected behaviour

Twig variables don't get escaped after saving the header and footer E-Mail template and thus get interpreted as twig variables instead of being rendered as a string.

Actual behaviour

Curly braces of twig variables get escaped inside some HTML-tag attributes in header & footer E-Mail templates and thus do not get interpreted as twig variables but instead being rendered as a string.

How to reproduce

  1. Create a new header and footer E-Mail template
  2. Add the following HTML code to the HTML mail header and HTML mail footer textarea: <img src="{{ salesChannel }}" alt="{{ salesChannel }}" /> <a href="{{ salesChannel }}" class="{{ salesChannel }}">{{ salesChannel }}</a>
  3. Save

The HTML in both textareas will have been converted to the following: <img src="%7B%7B%20salesChannel%20%7D%7D" alt="{{ salesChannel }}" /> <a href="%7B%7B%20salesChannel%20%7D%7D" class="{{ salesChannel }}">{{ salesChannel }}</a>

shopware-issue-bot[bot] commented 1 year ago

We found the following existing issues which may help or are related to your topic: