Re: Patch for mailto: link urlencoding
"Michael A. Puls II" <[email protected]>
| Newsgroups | gmane.mail.squirrelmail.devel |
|---|---|
| Message-ID | <op.u6hen1jk1ejg13@sandra-svwliu01> |
On Wed, 13 Jan 2010 10:33:44 -0500, Michael A. Puls II <[email protected]> wrote: > Attached is the full patch. Hope that helps. Attaching the same patch but using str_replace() since regex isn't needed. -- Michael ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ----- squirrelmail-devel mailing list Posting guidelines: http://squirrelmail.org/postingguidelines List address: [email protected] List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel
url_parser.php.patch
(application/octet-stream, 948 B)
Index: functions/url_parser.php
===================================================================
--- functions/url_parser.php (revision 13883)
+++ functions/url_parser.php (working copy)
@@ -130,9 +130,9 @@
if ((preg_match($MailTo_PReg_Match, $mailto, $regs)) && ($regs[0] != '')) {
//sm_print_r($regs);
$mailto_before = $target_token . $regs[0];
- $mailto_params = $regs[10];
+ $mailto_params = str_replace("+", "%2B", $regs[10]);
if ($regs[1]) { //if there is an email addr before '?', we need to merge it with the params
- $to = 'to=' . $regs[1];
+ $to = 'to=' . str_replace("+", "%2B", $regs[1]);
if (strpos($mailto_params, 'to=') > -1) //already a 'to='
$mailto_params = str_replace('to=', $to . '%2C%20', $mailto_params);
else {