Ignore:
Timestamp:
Nov 14, 2010 6:35:38 AM (3 years ago)
Author:
alec
Message:
  • Fix hanling of HTML entity strings in plai text messages
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/steps/mail/compose.inc

    r4190 r4223  
    647647 
    648648  // If desired, set this textarea to be editable by TinyMCE 
    649   if ($isHtml) $attrib['class'] = 'mce_editor'; 
    650   $textarea = new html_textarea($attrib); 
    651   $out .= $textarea->show($MESSAGE_BODY); 
     649  if ($isHtml) { 
     650    $attrib['class'] = 'mce_editor'; 
     651    $textarea = new html_textarea($attrib); 
     652    $out .= $textarea->show($MESSAGE_BODY); 
     653  } 
     654  else { 
     655    $textarea = new html_textarea($attrib); 
     656    $out .= $textarea->show(''); 
     657    // quote plain text, inject into textarea 
     658    $table = get_html_translation_table(HTML_SPECIALCHARS); 
     659    $MESSAGE_BODY = strtr($MESSAGE_BODY, $table); 
     660    $out = substr($out, 0, -11) . $MESSAGE_BODY . '</textarea>'; 
     661  } 
     662 
    652663  $out .= $form_end ? "\n$form_end" : ''; 
    653664 
Note: See TracChangeset for help on using the changeset viewer.