Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
A token replacement is wrapped in a \Drupal\Component\Render\HtmlEscapedText object which escapes html entities. However mail headers don't except those entites to be encoded.
For example when the site name contains a '-character and it is used as [site:name] in the from_name parameter, the '-character is encoded to '
Proposed resolution
(Description of the proposed solution, the rationale behind it, and workarounds for people who cannot use the patch.)
Comment | File | Size | Author |
---|---|---|---|
#6 | 2937764-6.patch | 1.12 KB | jrockowitz |
| |||
#6 | interdiff-2937764-2-6.txt | 1.03 KB | jrockowitz |
#2 | 2937764-2.patch | 839 bytes | casey |
Comments
Comment #2
casey CreditAttribution: casey at SWIS commentedComment #4
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented@casey Your approach might be the only solution because the webform module does support returning the raw (decoded) value but other tokens like users and site information will always be an HTML encoded value. We should probably not decode HTML entities for the 'message'.
Comment #5
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedThis patch just needs to be updated to not decode the HTML message.
Comment #6
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #7
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented