Do not encode html entities in emails (#457)
This commit is contained in:
parent
56bdfdea6a
commit
c3942c3b75
2 changed files with 7 additions and 5 deletions
|
@ -9,6 +9,7 @@ Note - All hash comments refer to the issue number. Eg. #169 refers to https://g
|
|||
### Fixed
|
||||
- Fix places not using the multi-language filter (#433).
|
||||
- Fix user IDs in the issue table not being mapped during restore (#449).
|
||||
- Fix emails displaying HTML entities encoded (#457).
|
||||
|
||||
### Added
|
||||
- You can now choose the course short or full name to display (#415).
|
||||
|
|
|
@ -211,7 +211,8 @@ class email_certificate_task extends \core\task\scheduled_task {
|
|||
$subject = get_string('emailstudentsubject', 'customcert', $info);
|
||||
$message = $textrenderer->render($renderable);
|
||||
$messagehtml = $htmlrenderer->render($renderable);
|
||||
email_to_user($user, fullname($userfrom), $subject, $message, $messagehtml, $tempfile, $filename);
|
||||
email_to_user($user, fullname($userfrom), html_entity_decode($subject), $message, $messagehtml,
|
||||
$tempfile, $filename);
|
||||
}
|
||||
|
||||
if ($customcert->emailteachers) {
|
||||
|
@ -222,8 +223,8 @@ class email_certificate_task extends \core\task\scheduled_task {
|
|||
$message = $textrenderer->render($renderable);
|
||||
$messagehtml = $htmlrenderer->render($renderable);
|
||||
foreach ($teachers as $teacher) {
|
||||
email_to_user($teacher, fullname($userfrom), $subject, $message, $messagehtml, $tempfile,
|
||||
$filename);
|
||||
email_to_user($teacher, fullname($userfrom), html_entity_decode($subject), $message, $messagehtml,
|
||||
$tempfile, $filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -242,8 +243,8 @@ class email_certificate_task extends \core\task\scheduled_task {
|
|||
$emailuser = new \stdClass();
|
||||
$emailuser->id = -1;
|
||||
$emailuser->email = $email;
|
||||
email_to_user($emailuser, fullname($userfrom), $subject, $message, $messagehtml, $tempfile,
|
||||
$filename);
|
||||
email_to_user($emailuser, fullname($userfrom), html_entity_decode($subject), $message,
|
||||
$messagehtml, $tempfile, $filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue