[development] URL encoding
donald at fane.com
Thu Mar 11 14:36:16 UTC 2010
So you want to replace the spaces, but not any of the non-alpha
characters? Sounds more like a preg_replace() action.
That way you could just create an array of patterns you want to replace,
rather than doing a real urlencode.
On 3/11/2010 9:17 AM, 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:
> For eg:
> http://example.com/q=12 &12grt key=value;<>+,.()!*
> is converted to
> Nitin Kumar Gupta
> On Thu, Mar 11, 2010 at 7:32 PM, Earnie Boyd
> <earnie at users.sourceforge.net <mailto:earnie at users.sourceforge.net>>
> nitin gupta wrote:
> 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
> characters in the URL and not just '?' or '&'.
> leads you to two api functions url  and drupal_urlencode .
> Are these what you need?
>  http://api.drupal.org/api/function/url
>  http://api.drupal.org/api/function/drupal_urlencode
> -- http://www.give-me-an-offer.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the development