struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Graham" <dgraham1...@hotmail.com>
Subject Re: html:rewrite possible bug
Date Mon, 05 May 2003 18:30:59 GMT
Encoding the ampersand is the way it's supposed to work.

David



>From: Dennis Muhlestein <dennis@zserve.com>
>Reply-To: "Struts Developers List" <struts-dev@jakarta.apache.org>
>To: struts-dev@jakarta.apache.org
>Subject: html:rewrite possible bug
>Date: Mon, 05 May 2003 11:38:51 -0600
>
>We use the rewrite tag occasionally within some javascript.  We have
>never used it with more than one parameter until today.
>
>Today when trying though, the outputted html is incorrect.
>
>Snippet:
><<<<<<<<<<<
><%      java.util.Hashtable parms = new java.util.Hashtable();
>         parms.put ( "PARAM1", "1" );
>         parms.put ( "PARAM2", "2" );
>         pageContext.setAttribute( "parms", parms ); %>
>     <!--
>     function MsgWindow()
>     {
>             newWindow = open("<html:rewrite href="/SomeLink"
>name="parms" />", .......
>>>>>>>>>>>>>
>
>The expcted Output is /SomeLink?PARAM1=1&PARAM2=2
>
>Instead, we get /SomeLink?PARAM1=1&amp;PARAM2=2
>(NOTE THE &amp;)
>
>Our workaround for right now is to use a small jsp code snippet to write  
>our own parameter string, then pass that string to the href parameter of 
>the rewrite tag.
>
>Is this a known issue?  Something is double encoding the parameter string.  
>Should I file a bug on this?  It seems like a small issue to fix before 
>1.1.
>
>html:rewrite & sslext:rewrite are affected the same way.
>
>Neither html:link or sslext:link show this behavior. (Docs say they
>should behave the same minus the "<a href..." part)
>
>We are using 1.1rc1 but also tried this with the nightly build: 20030501
>
>
>TIA
>-Dennis
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>


_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail


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


Mime
View raw message