Do not encode html entities in emails (#457)
This commit is contained in:
parent
b684fee9f4
commit
80dc7395c3
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
|
### Fixed
|
||||||
- Fix places not using the multi-language filter (#433).
|
- Fix places not using the multi-language filter (#433).
|
||||||
- Fix user IDs in the issue table not being mapped during restore (#449).
|
- Fix user IDs in the issue table not being mapped during restore (#449).
|
||||||
|
- Fix emails displaying HTML entities encoded (#457).
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- You can now choose the course short or full name to display (#415).
|
- You can now choose the course short or full name to display (#415).
|
||||||
|
|
|
@ -213,7 +213,8 @@ class email_certificate_task extends \core\task\scheduled_task {
|
||||||
$subject = get_string('emailstudentsubject', 'customcert', $info);
|
$subject = get_string('emailstudentsubject', 'customcert', $info);
|
||||||
$message = $textrenderer->render($renderable);
|
$message = $textrenderer->render($renderable);
|
||||||
$messagehtml = $htmlrenderer->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) {
|
if ($customcert->emailteachers) {
|
||||||
|
@ -224,8 +225,8 @@ class email_certificate_task extends \core\task\scheduled_task {
|
||||||
$message = $textrenderer->render($renderable);
|
$message = $textrenderer->render($renderable);
|
||||||
$messagehtml = $htmlrenderer->render($renderable);
|
$messagehtml = $htmlrenderer->render($renderable);
|
||||||
foreach ($teachers as $teacher) {
|
foreach ($teachers as $teacher) {
|
||||||
email_to_user($teacher, fullname($userfrom), $subject, $message, $messagehtml, $tempfile,
|
email_to_user($teacher, fullname($userfrom), html_entity_decode($subject), $message, $messagehtml,
|
||||||
$filename);
|
$tempfile, $filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,8 +245,8 @@ class email_certificate_task extends \core\task\scheduled_task {
|
||||||
$emailuser = new \stdClass();
|
$emailuser = new \stdClass();
|
||||||
$emailuser->id = -1;
|
$emailuser->id = -1;
|
||||||
$emailuser->email = $email;
|
$emailuser->email = $email;
|
||||||
email_to_user($emailuser, fullname($userfrom), $subject, $message, $messagehtml, $tempfile,
|
email_to_user($emailuser, fullname($userfrom), html_entity_decode($subject), $message,
|
||||||
$filename);
|
$messagehtml, $tempfile, $filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue