Re: Patch for mailto: link urlencoding
"Michael A. Puls II" <[email protected]>
| Newsgroups | gmane.mail.squirrelmail.devel |
|---|---|
| Message-ID | <op.u6f0xzce1ejg13@sandra-svwliu01> |
On Tue, 12 Jan 2010 13:58:59 -0500, Jon Nathan <[email protected]> wrote: > > Thanks for your feedback. What do you think the appropriate way > to adress this is? I'd hate to only urlencode specific characters. In page_header.php, you can change the makeInternalLink function to this: function makeInternalLink($path, $text, $target='') { sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION); if ($target != '') { $target = " target=\"$target\""; } if (preg_match("/^mailto:/i", $text)) { $text = preg_replace("/\\+/", "%2B", $text); // optional $path = preg_replace("/\\+/", "%2B", $path); } return '<a href="'.$base_uri.$path.'"'.$target.'>'.$text.'</a>'; } However, that's NOT the right way to do it. That's just a quick fix that counts on $path not containing any '+' characters that are for something other than the compose data. -- 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