From df0fb2f0df335eb176f33c53b372a364a504e540 Mon Sep 17 00:00:00 2001 From: estadtherr Date: Tue, 5 Jun 2007 04:19:43 +0000 Subject: fixed HTML->Plain conversion git-svn-id: https://svn.roundcube.net/trunk@593 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/index.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'roundcubemail/index.php') diff --git a/roundcubemail/index.php b/roundcubemail/index.php index 60474998f..bde223497 100644 --- a/roundcubemail/index.php +++ b/roundcubemail/index.php @@ -82,6 +82,7 @@ require_once('include/rcube_imap.inc'); require_once('include/bugs.inc'); require_once('include/main.inc'); require_once('include/cache.inc'); +require_once('lib/html2text.inc'); require_once('PEAR.php'); @@ -145,6 +146,21 @@ if ($_action=='error' && !empty($_GET['_code'])) raise_error(array('code' => hexdec($_GET['_code'])), FALSE, TRUE); +// handle HTML->text conversion +if ($_action=='html2text') +{ + $htmlText = $HTTP_RAW_POST_DATA; + $converter = new html2text($htmlText); + + // TODO possibly replace with rcube_remote_response() + header('Content-Type: text/plain'); + $plaintext = $converter->get_text(); + print $plaintext; + + exit; +} + + // try to log in if ($_action=='login' && $_task=='mail') { -- cgit v1.2.3