Skip to content

Commit

Permalink
Merge pull request #126 from systemseed/email-utf8
Browse files Browse the repository at this point in the history
Add support utf-8 to falcon_mail
  • Loading branch information
spleshka committed Jul 7, 2020
2 parents fe7a5fa + 5fe0d4b commit 4c75d7d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 51 deletions.
6 changes: 0 additions & 6 deletions falcon/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,6 @@
"drupal/core": {
"Pagination in rest views": "https://www.drupal.org/files/issues/2019-05-21/2982729-viewsRestInfo-13_0.patch"
},
"drupal/jsonapi_extras": {
"Compatibility with drupal 8.8": "https://www.drupal.org/files/issues/2019-12-02/3089444-24.patch"
},
"drupal/config_pages": {
"Compatibility with drupal 8.8 REST api. Expose entity by string ID via rest": "https://www.drupal.org/files/issues/2019-12-09/config_pages-expose-entity-by-string-id-via-rest-3099665-2_0.patch"
},
"drupal/paragraphs_browser": {
"Bring back actions menu": "https://www.drupal.org/files/issues/2019-01-22/paragraphs_browser-extend-from-ParagraphsWidget-2917656-14_0.patch"
},
Expand Down
74 changes: 31 additions & 43 deletions falcon/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ public function mail(array $message) {
public function replaceRelativeUrlsWithSaveStyles($body) {
try {
// Create Global dom document.
$html = new \DOMDocument();
$html = new \DOMDocument('1.0', 'UTF-8');
// Add html. Disable errors and warnings for it.
$html->loadHTML($body, LIBXML_NOWARNING | LIBXML_NOERROR);
$html->loadHTML(mb_convert_encoding($body, 'HTML-ENTITIES', 'UTF-8'), LIBXML_NOWARNING | LIBXML_NOERROR);

// If $html does't have body than return $body with replaced tokens.
if (empty($html->getElementsByTagName('body')->count())) {
Expand Down

0 comments on commit 4c75d7d

Please sign in to comment.