diff options
author | svncommit <devs@roundcube.net> | 2007-06-05 04:19:43 +0000 |
---|---|---|
committer | svncommit <devs@roundcube.net> | 2007-06-05 04:19:43 +0000 |
commit | 570f0bb4a609b04dab58407a642922dfdf715bd5 (patch) | |
tree | b994161cbd798ae1ef0d46ae1b690e95e0540fee /index.php | |
parent | b2fb950fb58971a05d1c4d090132ab67afe6a6bd (diff) |
fixed HTML->Plain conversion
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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') { |