MDL-31458 forum: email subjects containing ampersand are sent as &
authorDan Poltawski <dan@moodle.com>
Fri, 11 May 2012 07:25:26 +0000 (15:25 +0800)
committerDan Poltawski <dan@moodle.com>
Fri, 11 May 2012 07:25:26 +0000 (15:25 +0800)
mod/forum/lib.php

index 05847e3..93f95c3 100644 (file)
@@ -628,7 +628,7 @@ function forum_cron() {
 
                 $shortname = format_string($course->shortname, true, array('context' => get_context_instance(CONTEXT_COURSE, $course->id)));
 
-                $postsubject = "$shortname: ".format_string($post->subject,true);
+                $postsubject = html_to_text("$shortname: ".format_string($post->subject, true));
                 $posttext = forum_make_mail_text($course, $cm, $forum, $discussion, $post, $userfrom, $userto);
                 $posthtml = forum_make_mail_html($course, $cm, $forum, $discussion, $post, $userfrom, $userto);