summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-06-20 11:40:05 +0000
committerthomascube <thomas@roundcube.net>2008-06-20 11:40:05 +0000
commitfde466c58c004e8f7eff7b59c78f62eef250cde9 (patch)
treed46360c24b111482b27f0a14a4ab821e3cfd4d7a /program/steps
parent2da368e6633ae4dec5d9b02ec3f4b693ffc9fb76 (diff)
Urlencode mail recipients for storing in session + little code cleanup
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/addressbook/mailto.inc4
-rw-r--r--program/steps/mail/compose.inc2
2 files changed, 3 insertions, 3 deletions
diff --git a/program/steps/addressbook/mailto.inc b/program/steps/addressbook/mailto.inc
index 101b7c043..90a779644 100644
--- a/program/steps/addressbook/mailto.inc
+++ b/program/steps/addressbook/mailto.inc
@@ -37,8 +37,8 @@ if (!empty($mailto))
{
$mailto_str = join(', ', $mailto);
$mailto_id = substr(md5($mailto_str), 0, 16);
- $_SESSION['mailto'][$mailto_id] = $mailto_str;
- $OUTPUT->command('redirect', rcmail_url('compose', array('_mailto' => $mailto_id), 'mail'));
+ $_SESSION['mailto'][$mailto_id] = urlencode($mailto_str);
+ $OUTPUT->redirect(array('task' => 'mail', '_action' => 'compose', '_mailto' => $mailto_id));
}
else
$OUTPUT->show_message('nocontactsfound', 'warning');
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 607cf9b05..800a9de85 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -135,7 +135,7 @@ function rcmail_compose_headers($attrib)
// we have a set of recipients stored is session
if (($mailto_id = $_SESSION['compose']['param']['_mailto']) && $_SESSION['mailto'][$mailto_id])
- $fvalue = $_SESSION['mailto'][$mailto_id];
+ $fvalue = urldecode($_SESSION['mailto'][$mailto_id]);
else if (!empty($_SESSION['compose']['param']['_to']))
$fvalue = $_SESSION['compose']['param']['_to'];