mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-24 15:48:55 +01:00
* Notifications: activate links when creating a html mail from a plain-text one
This commit is contained in:
parent
aef3627658
commit
529c392557
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user