Skip to content
This repository was archived by the owner on Feb 6, 2022. It is now read-only.

Added alternative mail formats view #33

Merged
merged 1 commit into from
Mar 25, 2013
Merged

Added alternative mail formats view #33

merged 1 commit into from
Mar 25, 2013

Conversation

alex88
Copy link
Contributor

@alex88 alex88 commented Mar 25, 2013

I've added a foreach on swiftmailer message parts to display also the alternate text/html text/plain version of the message.

Added a foreach on swiftmailer message parts to display also the alternate text/html text/plain version of the message.
fabpot added a commit that referenced this pull request Mar 25, 2013
This PR was merged into the master branch.

Discussion
----------

Added alternative mail formats view

I've added a foreach on swiftmailer message parts to display also the alternate text/html text/plain version of the message.

Commits
-------

750f809 Added alternative mail formats view
@fabpot fabpot merged commit 750f809 into symfony:master Mar 25, 2013
<p>
<pre>
{%- if messagePart.charset %}
{{- messagePart.body|e('html', messagePart.charset)|convert_encoding('UTF-8', messagePart.charset) }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't this be escaped a second time by the auto-escaper ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, should I just remove the escaping or also the convert_encoding?
Also, why does it escapes 2 times? Isn't it escaped as the main body?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are escaping it once explicitly, and converting the charset (which is not a filter marked as safe for the auto-escaper) and the auto-escaper escapes it again.

You should remove the e filter IMO (and also in the else part)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants