Changeset 570f0bb in github


Ignore:
Timestamp:
Jun 5, 2007 12:19:43 AM (6 years ago)
Author:
svncommit <devs@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
8094288
Parents:
b2fb950
Message:

fixed HTML->Plain conversion

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    rb2fb950 r570f0bb  
    11CHANGELOG RoundCube Webmail 
    22--------------------------- 
     3 
     42007/06/04 (estadtherr) 
     5---------- 
     6- Fixed bug in HTML->Plain editor toggling 
     7 
    38 
    492007/05/28 (thomasb) 
  • index.php

    r8d07583 r570f0bb  
    8383require_once('include/main.inc'); 
    8484require_once('include/cache.inc'); 
     85require_once('lib/html2text.inc'); 
    8586require_once('PEAR.php'); 
    8687 
     
    144145if ($_action=='error' && !empty($_GET['_code'])) 
    145146  raise_error(array('code' => hexdec($_GET['_code'])), FALSE, TRUE); 
     147 
     148 
     149// handle HTML->text conversion 
     150if ($_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} 
    146162 
    147163 
  • program/js/editor.js

    r2c63370 r570f0bb  
    101101  http_request.oncomplete = function(o) { rcmail_set_text_value(o); }; 
    102102  var url=rcmail.env.comm_path+'&_action=html2text'; 
    103   console('HTTP request: ' + url); 
    104103  http_request.POST(url, htmlText, 'application/octet-stream'); 
    105104  } 
Note: See TracChangeset for help on using the changeset viewer.