Skip to content
Browse files

MDL-29814 message: made html personal messages store a plain text ver…

…sion as a fallback
  • Loading branch information...
1 parent 735de1c commit 22e23da6f466c1c9fb454fa288b993795a41fb60 @andyjdavis andyjdavis committed Nov 19, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 message/lib.php
View
4 message/lib.php
@@ -2013,8 +2013,10 @@ function message_post_message($userfrom, $userto, $message, $format) {
$eventdata->subject = get_string_manager()->get_string('unreadnewmessage', 'message', fullname($userfrom), $userto->lang);
if ($format == FORMAT_HTML) {
- $eventdata->fullmessage = '';
$eventdata->fullmessagehtml = $message;
+ //some message processors may revert to sending plain text even if html is supplied
+ //so we keep both plain and html versions if we're intending to send html
+ $eventdata->fullmessage = html_to_text($eventdata->fullmessagehtml);
} else {
$eventdata->fullmessage = $message;
$eventdata->fullmessagehtml = '';

0 comments on commit 22e23da

Please sign in to comment.
Something went wrong with that request. Please try again.