Skip to content
Snippets Groups Projects
Commit 794a31d6 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2397607 by Berdir: contact_mail() should use renderPlain()

parent ca512491
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -115,7 +115,7 @@ function contact_mail($key, &$message, $params) {
$message['subject'] .= t('[!form] !subject', $variables, $options);
$message['body'][] = t("!sender-name (!sender-url) sent a message using the contact form at !form-url.", $variables, $options);
$build = entity_view($contact_message, 'mail', $language->getId());
$message['body'][] = drupal_render_root($build);
$message['body'][] = \Drupal::service('renderer')->renderPlain($build);
break;
case 'page_autoreply':
......@@ -134,7 +134,7 @@ function contact_mail($key, &$message, $params) {
$message['body'][] = t("!sender-name (!sender-url) has sent you a message via your contact form at !site-name.", $variables, $options);
$message['body'][] = t("If you don't want to receive such emails, you can change your settings at !recipient-edit-url.", $variables, $options);
$build = entity_view($contact_message, 'mail', $language->getId());
$message['body'][] = drupal_render_root($build);
$message['body'][] = \Drupal::service('renderer')->renderPlain($build);
break;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment