* Notifications: activate links when creating a html mail from a plain-text one

This commit is contained in:
Ralf Becker 2012-10-30 16:36:43 +00:00
parent aef3627658
commit 529c392557

View File

@ -454,18 +454,29 @@ final class notifications {
if(!empty($_message_plain)) {
$messages['plain'] = $_message_plain;
} else {
$messages['plain'] = strip_tags($_message_html);
$messages['plain'] = translation::convertHTMLToText($_message_html, false, true);
}
if(!empty($_message_html)) {
$messages['html'] = $_message_html;
} else {
$messages['html'] = nl2br($_message_plain);
$messages['html'] = self::plain2html($_message_plain);
}
return $messages;
}
/**
* Create html from plaintext message
*
* @param string $_plain
* @return string html message
*/
public static function plain2html($_plain)
{
return html::activate_links(nl2br(html::htmlspecialchars($_plain, true)));
}
/**
* prepends another message to the messages array
*