Permalink
Browse files

messages MDL-19107 html entities decoded and html tags removed from e…

…mail message subject line
  • Loading branch information...
Andrew Davis
Andrew Davis committed Nov 20, 2009
1 parent c917a13 commit 3e20548f1fc13453985ec86ccc57f74ded6df74a
Showing with 2 additions and 0 deletions.
  1. +2 −0 message/lib.php
View
@@ -974,6 +974,8 @@ function message_post_message($userfrom, $userto, $message, $format, $messagetyp
$tagline = get_string('emailtagline', 'message', $SITE->shortname);
$messagesubject = preg_replace('/\s+/', ' ', strip_tags($message)); // make sure it's all on one line
+ //convert things like &quot; back to regular characters then strip out tags like <b> <p> etc
+ $messagesubject = strip_tags(html_entity_decode($messagesubject));
$messagesubject = message_shorten_message($messagesubject, 30).'...';
$messagetext = format_text_email($message, $format).

0 comments on commit 3e20548

Please sign in to comment.