diff options
| author | estadtherr <estadtherr@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-06-05 04:19:43 +0000 |
|---|---|---|
| committer | estadtherr <estadtherr@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-06-05 04:19:43 +0000 |
| commit | df0fb2f0df335eb176f33c53b372a364a504e540 (patch) | |
| tree | 215c34261fda92974041556bf82bb97fd69d9783 | |
| parent | ac05be61cc13a1e428145fe1176cf746ac28295d (diff) | |
fixed HTML->Plain conversion
git-svn-id: https://svn.roundcube.net/trunk@593 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/CHANGELOG | 5 | ||||
| -rw-r--r-- | roundcubemail/index.php | 16 | ||||
| -rw-r--r-- | roundcubemail/program/js/editor.js | 1 |
3 files changed, 21 insertions, 1 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG index 54830f1dd..e58d64383 100644 --- a/roundcubemail/CHANGELOG +++ b/roundcubemail/CHANGELOG @@ -1,6 +1,11 @@ CHANGELOG RoundCube Webmail --------------------------- +2007/06/04 (estadtherr) +---------- +- Fixed bug in HTML->Plain editor toggling + + 2007/05/28 (thomasb) --------- - Fixed buggy imap_root settings (closes #1484379) 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') { diff --git a/roundcubemail/program/js/editor.js b/roundcubemail/program/js/editor.js index 536762e72..3a191b594 100644 --- a/roundcubemail/program/js/editor.js +++ b/roundcubemail/program/js/editor.js @@ -100,7 +100,6 @@ function rcmail_html2plain(htmlText) http_request.onerror = function(o) { rcmail_handle_toggle_error(o); }; http_request.oncomplete = function(o) { rcmail_set_text_value(o); }; var url=rcmail.env.comm_path+'&_action=html2text'; - console('HTTP request: ' + url); http_request.POST(url, htmlText, 'application/octet-stream'); } |
