From: Michael M Slusarz Date: Fri, 21 Nov 2008 07:39:21 +0000 (-0700) Subject: Re-add emoticons. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=82064fec4b16f3e9d73e2557d54852aaf3e51d47;p=horde.git Re-add emoticons. --- diff --git a/imp/lib/Mime/Viewer/html.php b/imp/lib/Mime/Viewer/html.php index 8350ba703..7e9055665 100644 --- a/imp/lib/Mime/Viewer/html.php +++ b/imp/lib/Mime/Viewer/html.php @@ -222,13 +222,14 @@ class IMP_Horde_Mime_Viewer_html extends Horde_Mime_Viewer_html ); $data = preg_replace_callback($this->_img_regex, array($this, '_blockImages'), $data); - - // TODO - //$msg = '' . nl2br($msg) . '
'; - //$msg = '' . $msg . ''; } } + require_once 'Horde/Text/Filter.php'; + if ($GLOBALS['prefs']->getValue('emoticons')) { + $data = Text_Filter::filter($data, array('emoticons'), array(array('emoticons' => true))); + } + return array( 'html' => $data, 'status' => $cleanhtml['status'] diff --git a/imp/lib/Mime/Viewer/plain.php b/imp/lib/Mime/Viewer/plain.php index dadb61362..7880a5234 100644 --- a/imp/lib/Mime/Viewer/plain.php +++ b/imp/lib/Mime/Viewer/plain.php @@ -93,6 +93,10 @@ class IMP_Horde_Mime_Viewer_plain extends Horde_Mime_Viewer_plain ); } + if ($prefs->getValue('emoticons')) { + $filters['emoticons'] = array('entities' => true); + } + // Run filters. $text = Text_Filter::filter($text, array_keys($filters), array_values($filters));