diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-11-14 11:35:38 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-11-14 11:35:38 +0000 |
| commit | a66fd7b8815b120becb59e92cc02b4c8a3d77679 (patch) | |
| tree | dc55bb69654bda202bb78aae9846e028bb28076b /roundcubemail/program/steps/mail/compose.inc | |
| parent | e688b77125151dbbd2028f269533189fdad64904 (diff) | |
- Fix hanling of HTML entity strings in plai text messages
git-svn-id: https://svn.roundcube.net/trunk@4223 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/compose.inc')
| -rw-r--r-- | roundcubemail/program/steps/mail/compose.inc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/roundcubemail/program/steps/mail/compose.inc b/roundcubemail/program/steps/mail/compose.inc index 471649c04..3f2b8c5d2 100644 --- a/roundcubemail/program/steps/mail/compose.inc +++ b/roundcubemail/program/steps/mail/compose.inc @@ -646,9 +646,20 @@ function rcmail_compose_body($attrib) $out .= $msgtype->show(); // If desired, set this textarea to be editable by TinyMCE - if ($isHtml) $attrib['class'] = 'mce_editor'; - $textarea = new html_textarea($attrib); - $out .= $textarea->show($MESSAGE_BODY); + if ($isHtml) { + $attrib['class'] = 'mce_editor'; + $textarea = new html_textarea($attrib); + $out .= $textarea->show($MESSAGE_BODY); + } + else { + $textarea = new html_textarea($attrib); + $out .= $textarea->show(''); + // quote plain text, inject into textarea + $table = get_html_translation_table(HTML_SPECIALCHARS); + $MESSAGE_BODY = strtr($MESSAGE_BODY, $table); + $out = substr($out, 0, -11) . $MESSAGE_BODY . '</textarea>'; + } + $out .= $form_end ? "\n$form_end" : ''; $OUTPUT->set_env('composebody', $attrib['id']); |
