Author: leithoff
New Revision: 54903
URL: http://svn.stylite.de/viewvc/egroupware?rev=54903&view=rev
Log:
attempt to improve html2text conversion
Modified:
branches/14.2/phpgwapi/inc/class.translation.inc.php
— branches/14.2/phpgwapi/inc/class.translation.inc.php (original)
+++ branches/14.2/phpgwapi/inc/class.translation.inc.php Tue Feb 2 14:04:29 2016
@@ -1394,6 +1394,10 @@
11 => ‘/
/’,
12 => ‘~
~si’,
13 => ‘~<blockquote[^>]*>~si’,
-
14 => '/<=([1234567890])/',
-
15 => '/>=([1234567890])/',
-
16 => '/<([1234567890])/',
-
17 => '/>([1234567890])/',
);
$Replace = array (
0 => "\r\n",
@@ -1410,6 +1414,10 @@
11 => ‘#blockquote#type#cite#’,
12 => ‘#blockquote#end#cite#’,
13 => ‘#blockquote#type#cite#’,
-
14 => '#lowerorequal#than#$1',
-
15 => '#greaterorequal#than#$1',
-
16 => '#lower#than#$1',
-
17 => '#greater#than#$1',
);
$_html = preg_replace($tags,$Replace,$_html);
$_html = preg_replace('~</t(d|h)>\s*<t(d|h)[^>]*>~si',' - ',$_html);
@@ -1463,6 +1471,11 @@
if ($isHTML) $_html = preg_replace(’~ +~s’,’ ‘,$_html);
// restoring ampersands
$_html = str_replace(’#amper#sand#’,’&’,$_html);
-
// restoring lower|greater[or equal] than
-
$_html = str_replace('#lowerorequal#than#','<=',$_html);
-
$_html = str_replace('#greaterorequal#than#','>=',$_html);
-
$_html = str_replace('#lower#than#','<',$_html);
-
$_html = str_replace('#greater#than#','>',$_html);
//error_log(__METHOD__.__LINE__.' Charset:'.$displayCharset.' -> '.$_html);
$_html = html_entity_decode($_html, ENT_COMPAT, $displayCharset);
//error_log(__METHOD__.__LINE__.' Charset:'.$displayCharset.' After html_entity_decode: -> '.$_html);
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs