From d47243ef228a893fda11d5b8d7169a15cb21c333 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Fri, 9 Jan 2015 06:10:11 +0000 Subject: [PATCH] Ah, I see - the stuff after the ? needs to be handed to src/compose.php as-is, no encoding. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14490 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- plugins/listcommands/functions.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/plugins/listcommands/functions.php b/plugins/listcommands/functions.php index 5e71da5c..6c526c2a 100644 --- a/plugins/listcommands/functions.php +++ b/plugins/listcommands/functions.php @@ -84,6 +84,7 @@ function plugin_listcommands_menu_do() { /* proto = {mailto,href} */ $aActions = array_keys($actions); + // note that we only use the first cmd/action, ignore the rest $proto = array_shift($aActions); $act = array_shift($actions); @@ -95,7 +96,17 @@ function plugin_listcommands_menu_do() { } else { $url = "plugins/listcommands/mailout.php?action=$cmd&"; } - $url .= 'send_to=' . urlencode($act); + + // if things like subject are given, peel them off and give + // them to src/compose.php as is (not encoded) + if (strpos($act, '?') > 0) { + list($act, $parameters) = explode('?', $act, 2); + $parameters = '&' . $parameters; + } else { + $parameters = ''; + } + + $url .= 'send_to=' . urlencode($act) . $parameters; $links[$cmd] = makeComposeLink($url, $fieldsdescr[$cmd]); -- 2.25.1