Skip to content
Snippets Groups Projects
Commit 09d89d11 authored by Jean-Philippe Guérard's avatar Jean-Philippe Guérard
Browse files

Always decode HTML entities

parent 97223881
No related branches found
No related tags found
No related merge requests found
......@@ -167,7 +167,7 @@ function validateEmail($email)
function sendEmail( $to, $subject, $body, $headers, $param)
{
$to_list = explode( ',', $to ) ;
$to_list = explode( ',', html_entity_decode($to, ENT_QUOTES, 'UTF-8' ) ;
$to = "" ;
$first = 1 ;
......@@ -182,7 +182,8 @@ function sendEmail( $to, $subject, $body, $headers, $param)
$first = 0 ;
} ;
$subject = '=?UTF-8?B?' . base64_encode( $subject ) . '?=' ;
$subject = '=?UTF-8?B?' . base64_encode( html_entity_decode( $subject, ENT_QUOTES, 'UTF-8' ) ) . '?=' ;
$body = html_entity_decode( $body, ENT_QUOTES, 'UTF-8' ) ;
mail( $to, $subject, $body, $headers, $param ) ;
......
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