From 82064fec4b16f3e9d73e2557d54852aaf3e51d47 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 21 Nov 2008 00:39:21 -0700 Subject: [PATCH] Re-add emoticons. --- imp/lib/Mime/Viewer/html.php | 9 +++++---- imp/lib/Mime/Viewer/plain.php | 4 ++++ 2 files changed, 9 insertions(+), 4 deletions(-) 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)); -- 2.11.0