You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Manu Mahajan <ma...@comprointertech.com> on 2007/04/12 08:26:49 UTC

[s2] s:url escaping '&' between params

Hi

I'm facing a very annoying problem with s:url. For some reason it is 
encoding the '&' between the params to &amp;

Here's my code

<s:url action="getfilebrowserbody" encode="false" id="filebrowserurl">
    <s:param name="currentdirectory" value="strcurrentdir" />
    <s:param name="rootdirectory" value="strrootdir" />
</s:url>

<s:property escape="false" value="filebrowserurl" />

The above code outputs the url with parameters and '&' encoded

What could be the reason?


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [s2] s:url escaping '&' between params

Posted by joey <re...@gmail.com>.
I tried your code,but it worked fine!

On 4/12/07, Manu Mahajan <ma...@comprointertech.com> wrote:
>
> Hi
>
> I'm facing a very annoying problem with s:url. For some reason it is
> encoding the '&' between the params to &amp;
>
> Here's my code
>
> <s:url action="getfilebrowserbody" encode="false" id="filebrowserurl">
>     <s:param name="currentdirectory" value="strcurrentdir" />
>     <s:param name="rootdirectory" value="strrootdir" />
> </s:url>
>
> <s:property escape="false" value="filebrowserurl" />
>
> The above code outputs the url with parameters and '&' encoded
>
> What could be the reason?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: [s2] s:url escaping '&' between params

Posted by Leon Rosenberg <ro...@googlemail.com>.
I'm not sure that I understand you correctly, but & has to be encoded
to &amp; in html. A html link http://bla?a=b&c=d is invalid, the
proper link would be
http://bla?a=b&amp;c=d

regards
Leon

On 4/12/07, Manu Mahajan <ma...@comprointertech.com> wrote:
> Hi
>
> I'm facing a very annoying problem with s:url. For some reason it is
> encoding the '&' between the params to &amp;
>
> Here's my code
>
> <s:url action="getfilebrowserbody" encode="false" id="filebrowserurl">
>     <s:param name="currentdirectory" value="strcurrentdir" />
>     <s:param name="rootdirectory" value="strrootdir" />
> </s:url>
>
> <s:property escape="false" value="filebrowserurl" />
>
> The above code outputs the url with parameters and '&' encoded
>
> What could be the reason?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org