From 4aec82a01e66c0eeebb4e71fa8506904e0fdad4c Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 19 Feb 2010 12:57:50 -0700 Subject: [PATCH] More html2text tweaks --- .../Text_Filter/lib/Horde/Text/Filter/Html2text.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/framework/Text_Filter/lib/Horde/Text/Filter/Html2text.php b/framework/Text_Filter/lib/Horde/Text/Filter/Html2text.php index a548dd97a..698aa1bc3 100644 --- a/framework/Text_Filter/lib/Horde/Text/Filter/Html2text.php +++ b/framework/Text_Filter/lib/Horde/Text/Filter/Html2text.php @@ -96,7 +96,7 @@ class Horde_Text_Filter_Html2text extends Horde_Text_Filter_Base // '/|\s[^>]*>)(.+?)<\/strong>/ie' => 'strtoupper("\\1")', - '/(.+?)<\/span>/ie' => 'strtoupper("\\1")', + '/(.+?)<\/span>/ie' => 'strtoupper("\\1")', // '/|\s[^>]*>)(.+?)<\/i>/i' => '/\\1/', @@ -130,7 +130,10 @@ class Horde_Text_Filter_Html2text extends Horde_Text_Filter_Base // Some mailers (e.g. Hotmail) use the following div tag as a way // to define a block of text. - '/
(.+?)<\/div> ?/i' => '\\1
', + '/
(.+?)<\/div> ?/i' => '\\1
', + + // Cite blocks. + '/\s*]*(?:type="?cite"?|class="?gmail_quote"?)[^>]*>\s*/i' => '', //
'/]*>/i' => "\n" @@ -158,13 +161,10 @@ class Horde_Text_Filter_Html2text extends Horde_Text_Filter_Base public function postProcess($text) { /* Convert blockquote tags. */ - $text = preg_replace(array('/
]*(type="?cite"?|class="?gmail_quote"?)[^>]*>\n?/', - '/\n?<\/blockquote>\n?/is'), - array(chr(0), chr(1)), - $text); - if (strpos($text, chr(0)) !== false) { - $text = $this->_blockQuote($text); - } + return $text; + // if (strpos($text, chr(0)) !== false) { + // $text = $this->_blockQuote($text); +// } /* Strip any other HTML tags. */ $text = strip_tags($text); -- 2.11.0