[development] URL encoding

nitin gupta nitingupta.iitg at gmail.com
Thu Mar 11 14:17:04 UTC 2010


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

For eg:

http://example.com/q=12 &12grt key=value;<>+,.()!*

is converted to

http://example.com/q=12%20&12grt%20key=value;%3C%3E+,.()!*


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


On Thu, Mar 11, 2010 at 7:32 PM, Earnie Boyd
<earnie at users.sourceforge.net>wrote:

> nitin gupta wrote:
>
>>  Hi,
>>
>>  I am not creating the URL, but I parse the URL from XML content and I
>>  want to urlencode it. Also, I am looking to preserve all the reserved
>>  characters in the URL and not just '?' or '&'.
>>
>>
> http://www.google.com/search?q=url+encoding+site%3Aapi.drupal.org leads
> you to two api functions url [1] and drupal_urlencode [2].  Are these what
> you need?
>
> [1] http://api.drupal.org/api/function/url
> [2] http://api.drupal.org/api/function/drupal_urlencode
>
> --
> Earnie
> -- http://www.give-me-an-offer.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20100311/f9d51885/attachment.html 


More information about the development mailing list