Changeset 611 in subversion
- Timestamp:
- Jun 8, 2007 7:47:57 PM (6 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 3 edited
-
bin/html2text.php (modified) (1 diff)
-
index.php (modified) (2 diffs)
-
program/js/editor.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/bin/html2text.php
r543 r611 9 9 $plaintext = $converter->get_text(); 10 10 11 if (function_exists('html_entity_decode')) 11 $phpver = explode('.', phpversion()); 12 $vernum = $phpver[0] . $phpver[1] . $phpver[2]; 13 14 # html_entity_decode doesn't handle UTF character sets in PHP 4.x 15 16 if (($vernum >= 500) && function_exists('html_entity_decode')) 12 17 print html_entity_decode($plaintext, ENT_COMPAT, 'UTF-8'); 13 18 else -
trunk/roundcubemail/index.php
r593 r611 83 83 require_once('include/main.inc'); 84 84 require_once('include/cache.inc'); 85 require_once('lib/html2text.inc');86 85 require_once('PEAR.php'); 87 86 … … 145 144 if ($_action=='error' && !empty($_GET['_code'])) 146 145 raise_error(array('code' => hexdec($_GET['_code'])), FALSE, TRUE); 147 148 149 // handle HTML->text conversion150 if ($_action=='html2text')151 {152 $htmlText = $HTTP_RAW_POST_DATA;153 $converter = new html2text($htmlText);154 155 // TODO possibly replace with rcube_remote_response()156 header('Content-Type: text/plain');157 $plaintext = $converter->get_text();158 print $plaintext;159 160 exit;161 }162 146 163 147 -
trunk/roundcubemail/program/js/editor.js
r593 r611 100 100 http_request.onerror = function(o) { rcmail_handle_toggle_error(o); }; 101 101 http_request.oncomplete = function(o) { rcmail_set_text_value(o); }; 102 var url=rcmail.env.comm_path+'&_action=html2text'; 102 var url = rcmail.env.bin_path+'html2text.php'; 103 console.log('HTTP request: ' + url); 103 104 http_request.POST(url, htmlText, 'application/octet-stream'); 104 105 }
Note: See TracChangeset
for help on using the changeset viewer.
