message MDL-26077 fixed up a problem with html tags being stripped out

This commit is contained in:
Andrew Davis (andyjdavis)
2011-03-28 16:00:36 +08:00
committed by Sam Hemelryk
parent 77bfc4ce0f
commit cd4ca97611
3 changed files with 5 additions and 4 deletions
+3 -3
View File
@@ -1879,9 +1879,9 @@ function message_format_message($message, $format='', $keywords='', $class='othe
//if supplied display small messages as fullmessage may contain boilerplate text that shouldnt appear in the messaging UI
if (!empty($message->smallmessage)) {
$messagetext = format_text($message->smallmessage, FORMAT_MOODLE, $options);
$messagetext = format_text(s($message->smallmessage), FORMAT_MOODLE, $options);
} else {
$messagetext = format_text($message->fullmessage, $message->fullmessageformat, $options);
$messagetext = format_text(s($message->fullmessage), $message->fullmessageformat, $options);
}
$messagetext .= message_format_contexturl($message);
@@ -1945,7 +1945,7 @@ function message_post_message($userfrom, $userto, $message, $format) {
}
$eventdata->fullmessageformat = $format;
$eventdata->smallmessage = strip_tags($message);//strip just in case there are is any html that would break the popup notification
$eventdata->smallmessage = $message;//store the message unfiltered. Clean up on output.
$s = new stdClass();
$s->sitename = $SITE->shortname;