[development] URL encoding

nitin gupta nitingupta.iitg at gmail.com
Thu Mar 11 14:59:50 UTC 2010


This doesn't seem to work:

url('example.com/with spaces', array('absolute' => TRUE, 'external' =>
TRUE));

--
Regards,
Nitin Kumar Gupta
http://publicmind.in/blog/


On Thu, Mar 11, 2010 at 8:15 PM, ekes <ekes at aktivix.org> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 11/03/10 14:17, nitin gupta wrote:
> > Thanks Earnie, but that is not what I am looking for. It is essentially
> > similar to urlencode or rawurlencode. I am looking for a function that
> does
> > the work like the one present at the bottom of the page here:
> >
> > http://www.blooberry.com/indexdot/html/topics/urlencoding.htm
>
> If I understand correctly you have full uris that you want to check
> (encode) before using them out there. Why not use parse_url
> http://php.net/manual/en/function.parse-url.php to get the component
> parts and then pass them into url()
> http://api.drupal.org/api/function/url/6 (or l()) to get the sanitised
> correct version?
>
> ekes
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkuZAf4ACgkQR9het8OQC6WpvQCgrfMvP2kQaNJb5YYhl94G0GAF
> s18AniVEyL+qXSkm/+eWAwN6cvFF3HYz
> =05vz
> -----END PGP SIGNATURE-----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20100311/7bb77cb1/attachment.html 


More information about the development mailing list