#746182 by Berdir | lasac: Fixed \!pm_subject adds linebreak.
authorSascha Grossenbacher
Wed, 14 Apr 2010 08:33:11 +0000 (08:33 +0000)
committerSascha Grossenbacher
Wed, 14 Apr 2010 08:33:11 +0000 (08:33 +0000)
pm_email_notify/pm_email_notify.module

index 80555ed..98e1ca0 100644 (file)
@@ -126,8 +126,8 @@ function pm_email_notify_mail($key, &$message, $params) {
 function _pm_email_notify_token($recipient, $message) {
   $tokens = array(
     '!author' => $message['author']->name,
-    '!pm_subject' => drupal_html_to_text(check_plain($message['subject'])),
-    '!pm_body' => drupal_html_to_text(check_markup($message['body'], $message['format'], FALSE)),
+    '!pm_subject' => trim(drupal_html_to_text(check_plain($message['subject']))),
+    '!pm_body' => trim(drupal_html_to_text(check_markup($message['body'], $message['format'], FALSE))),
     '!thread' => $message['thread_id'],
     '!user_uid' => $recipient->uid,
     '!message' => url('messages/view/' . $message['thread_id'], array('absolute' => TRUE)),