Hi,

I am using message to log forum topics and replies in combination with message_subscribe to notify subscribers. When the topic title includes special characters such as double quotes message module stores these encoded, e.g. "Test me again"

This results in the email messages to be send to subscribers in showing the text encoded as well. I assume that the correct behaviour would be to have the email message read "Test me again"

Regards, J.

Comments

jelo created an issue. See original summary.

Maedi’s picture

Also experiencing this issue. The message type's "Message text" view mode "Notify - Email subject" doesn't appear to respect plain text configuration. Instead it converts the value to HTML, wrapping paragraph tags around the text.

I've unfortunately had to workaround with:

function mymodule_message_view($message, $view_mode, $langcode) {

  if (!empty($message->content['message__message_text__0']['#markup'])) {
    $text = &$message->content['message__message_text__0']['#markup'];
    $text = htmlspecialchars_decode(strip_tags($text), ENT_QUOTES);
  }
}
bluegeek9’s picture

Status: Active » Closed (outdated)