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.)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

casey created an issue. See original summary.

casey’s picture

Status: Active » Needs review
FileSize
839 bytes

Status: Needs review » Needs work

The last submitted patch, 2: 2937764-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

jrockowitz’s picture

@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'.

jrockowitz’s picture

This patch just needs to be updated to not decode the HTML message.

jrockowitz’s picture

Status: Needs work » Needs review
FileSize
1.03 KB
1.12 KB
jrockowitz’s picture

Status: Needs review » Fixed

  • jrockowitz committed b199efd on 8.x-5.x
    Issue #2937764 by jrockowitz, casey: Decode Html entities in mail...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.