From 2717f9f68e74277379c065d32bd0771976e49c86 Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Fri, 11 Dec 2009 11:53:54 -0500 Subject: [PATCH] - use proper unicode cleanup for JSON, fixes #1486356 --- program/steps/mail/compose.inc | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 3a8a776..560142b 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -55,8 +55,8 @@ // pipe compose parameters thru plugins $plugin = $RCMAIL->plugins->exec_hook('message_compose', $_SESSION['compose']); - $_SESSION['compose']['param'] = $plugin['param']; - + $_SESSION['compose']['param'] = array_merge($_SESSION['compose']['param'], $plugin['param']); + // add attachments listed by message_compose hook if (is_array($plugin['attachments'])) { foreach ($plugin['attachments'] as $attach) { @@ -445,10 +445,10 @@ else if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) $body = rcmail_create_draft_body($body, $isHtml); } - else if (!empty($_SESSION['compose']['param']['body'])) - { - $body = $_SESSION['compose']['param']['body']; - } + + $plugin = $RCMAIL->plugins->exec_hook('message_compose_body', + array('body' => $body, 'html' => $isHtml, 'mode' => $compose_mode)); + $body = $plugin['body']; $out = $form_start ? "$form_start\n" : ''; -- Gitblit v1.9.1