From d2d33462e7fb538bb94454d9ece7ce41d16a6147 Mon Sep 17 00:00:00 2001 From: Robert Zelnik Date: Mon, 3 Sep 2012 14:41:18 +0300 Subject: [PATCH] UTF-8 accented characters sent properly --- FormTemplateProcessor.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FormTemplateProcessor.module b/FormTemplateProcessor.module index cdbe4bb..c63cbd0 100644 --- a/FormTemplateProcessor.module +++ b/FormTemplateProcessor.module @@ -161,7 +161,7 @@ class FormTemplateProcessor extends WireData implements Module { if(in_array($field->name, $this->skipFields)) continue; $label = $field->label; - $value = htmlentities($this->contact->get($field->name)); + $value = htmlentities($this->contact->get($field->name), ENT_COMPAT, "UTF-8"); $message .= "

$label

$value

"; @@ -172,7 +172,7 @@ class FormTemplateProcessor extends WireData implements Module { } $message = "$message"; - $headers = "Content-Type: text/html;"; + $headers = "Content-type: text/html; charset=UTF-8" . "\r\n"; if($fromEmail) $headers = "From: $fromEmail\n$headers";