#1488529 closed Feature Requests (duplicate)

Support for HTML special character notations for "Save as drafts"

Reported by: hh Owned by:
Priority: 7 Milestone: 0.8-stable
Component: User Interface Version: 0.8-rc
Severity: minor Keywords: html literal draft quote
Cc:

Description

Support for HTML special character notations for "Save as drafts"

(HTML email only) As of 0.8-rc, if you save a copy of email draft containing HTML special character notations, such as & and <, these notations will be returned as raw HTML character entities when you edit the draft later. Such HTML notations should preferably be retained between edits. Please consider the following example.

FOR EXAMPLE:

  1. Start composing new HTML email. (Be sure to set the editor to TinyMCE.)
  2. Create a message body like:
    In HTML you can use &lt; to get <.
    
  3. Save the message so you can edit it later. (Click Save as draft.)
  4. Select the mailbox folder where you saved the message. (By default it's Drafts.)
  5. Select the draft you just saved.
  6. Start editing the draft. (Click Edit.)

In the HTML editor, the original message will be shown as:

In HTML you can use < to get <.

which is not exactly the text you entered in Step 1 above. A quick fix would be:

*** program/steps/mail/compose.inc.orig	Fri May 18 16:06:54 2012
--- program/steps/mail/compose.inc	Mon Jun 11 05:21:43 2012
***************
*** 772,778 ****
    if ($isHtml) {
      $attrib['class'] = 'mce_editor';
      $textarea = new html_textarea($attrib);
!     $out .= $textarea->show($MESSAGE_BODY);
    }
    else {
      $textarea = new html_textarea($attrib);
--- 772,778 ----
    if ($isHtml) {
      $attrib['class'] = 'mce_editor';
      $textarea = new html_textarea($attrib);
!     $out .= $textarea->show(htmlspecialchars($MESSAGE_BODY));
    }
    else {
      $textarea = new html_textarea($attrib);

Change History (1)

comment:1 Changed 11 months ago by alec

  • Milestone changed from later to 0.8-stable
  • Resolution set to duplicate
  • Status changed from new to closed

This is a duplicate. The issue was fixed in git (after 0.8-rc release).

Note: See TracTickets for help on using tickets.