List Info

Thread: URL Encoded ReturnURLs in Templates!




URL Encoded ReturnURLs in Templates!
country flaguser name
United States
2007-07-27 06:56:14
I just rigged up the following. It's leet ninja sh!t.

<xar:set 
name="return_url">urlencode(htmlspecialchars_de
code(urldecode(substr(xarServerGetCurrentURL(), 
strlen(xarServerGetBaseURL())))))</xar:set>

In case you need properly formatted returnurl's in your
templates.

Very useful for, say, multi-language setup. 

-St.Ego
_______________________________________________
Xaraya_devel mailing list
Xaraya_develxaraya.com
http:
//xaraya.com/mailman/listinfo/xaraya_devel

Re: URL Encoded ReturnURLs in Templates!
country flaguser name
United States
2007-07-27 14:20:53
Revised to account for /'s

<xar:set
name="return_url">str_replace('%2F', '/', 
urlencode(htmlspecialchars_decode(urldecode(substr(xarServer
GetCurrentURL(), 
strlen(xarServerGetBaseURL()))))))</xar:set>


St.Ego wrote:
> I just rigged up the following. It's leet ninja sh!t.
> 
> <xar:set 
>
name="return_url">urlencode(htmlspecialchars_de
code(urldecode(substr(xarServerGetCurrentURL(), 
> strlen(xarServerGetBaseURL())))))</xar:set>
> 
> In case you need properly formatted returnurl's in your
templates.
> 
> Very useful for, say, multi-language setup. 
> 
> -St.Ego
_______________________________________________
Xaraya_devel mailing list
Xaraya_develxaraya.com
http:
//xaraya.com/mailman/listinfo/xaraya_devel

Re: URL Encoded ReturnURLs in Templates!
country flaguser name
United States
2007-07-28 18:46:38
St.Ego wrote:
> Revised to account for /'s
> 
> <xar:set
name="return_url">str_replace('%2F', '/',
>
urlencode(htmlspecialchars_decode(urldecode(substr(xarServer
GetCurrentURL(),
> strlen(xarServerGetBaseURL()))))))</xar:set>
> 
> 
> St.Ego wrote:
>> I just rigged up the following. It's leet ninja
sh!t.
>>
>> <xar:set
>>
name="return_url">urlencode(htmlspecialchars_de
code(urldecode(substr(xarServerGetCurrentURL(),
>> strlen(xarServerGetBaseURL())))))</xar:set>
>>
>> In case you need properly formatted returnurl's in
your templates.
>>
>> Very useful for, say, multi-language setup. 
>>
>> -St.Ego

So what exactly is a 'properly formatted returnurl'? I can
tell you one thing:
you cannot apply urlencode() to a complete URL without
trouble further down the
line.

-- JJ
_______________________________________________
Xaraya_devel mailing list
Xaraya_develxaraya.com
http:
//xaraya.com/mailman/listinfo/xaraya_devel

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )