You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jeff Sexton <js...@odshp.com> on 2003/06/13 19:15:17 UTC

Preventing a stylesheet from decoding %26 and %3f

I have a question that is the opposite of what is normally asked with
regard to ? and & characters in XML documents.

I'm replacing a servlet with an XSP.  This servlet generates a link where
the URL includes another URL as a parameter.  What the browser ends up
seeing is something like this:

<a href="/xxx/xxx?u=http://yyy/%3fP1=99%26P2=11&b=tt&o=qq">click me</a>

The link thus includes a parameter that is itself a URL with two
parameters of it's own (this allows me to do something really cool that I
won't go into).

What I did was create a sitemep entry that includes the parameters from
the 'outer' URL that are static.  It has a generate part ike this:

<map:generate
src="http://xxx/xxx{requestQuery}&amp;b=tt&amp;o=qq"/>

{requestQuery} receives the "u=http://...." generated in my stylesheet and
passed through to this sitemap match.

The trouble is that the XSL file that generates the link that includes the
URL parameter I want to end up in {requestQuery}, ends up "decoding" the
%3f and %26 (which someone asks this list how to do almost daily).

Thus the link ends up looking like this in the browser:

<a href="/xxx/xxx?u=http://yyy/?P1=99&P2=11&b=tt&o=qq">click me</a>

The characters in the inner (paramter) URL are thus transformed and cause
the browser to incorrectly break up the 'u' parameter.

My question: How can I prevent cocoon from turning %3f into '?' and %26
into '&' ?

Ideas?  Thanks!


Jeff Sexton
The ODS Companies
jsexton@odshp.com



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Preventing a stylesheet from decoding %26 and %3f

Posted by Jeff Sexton <js...@odshp.com>.
Once again, after asking a question, I have solved the problem myself.  It
turns out that there is no problem.  Cocoon does leave the escaped
charaters intact.  It's Mozilla that is displaying then in their decoded
form.  This through me because Netscape displays the link with the
characters in their encoded form.

On Fri, 13 Jun 2003, Jeff Sexton wrote:
> I have a question that is the opposite of what is normally asked with
> regard to ? and & characters in XML documents.
>
> I'm replacing a servlet with an XSP.  This servlet generates a link where
> the URL includes another URL as a parameter.  What the browser ends up
> seeing is something like this:
>
> <a href="/xxx/xxx?u=http://yyy/%3fP1=99%26P2=11&b=tt&o=qq">click me</a>
>
> The link thus includes a parameter that is itself a URL with two
> parameters of it's own (this allows me to do something really cool that I
> won't go into).
>
> What I did was create a sitemep entry that includes the parameters from
> the 'outer' URL that are static.  It has a generate part ike this:
>
> <map:generate
> src="http://xxx/xxx{requestQuery}&amp;b=tt&amp;o=qq"/>
>
> {requestQuery} receives the "u=http://...." generated in my stylesheet and
> passed through to this sitemap match.
>
> The trouble is that the XSL file that generates the link that includes the
> URL parameter I want to end up in {requestQuery}, ends up "decoding" the
> %3f and %26 (which someone asks this list how to do almost daily).
>
> Thus the link ends up looking like this in the browser:
>
> <a href="/xxx/xxx?u=http://yyy/?P1=99&P2=11&b=tt&o=qq">click me</a>
>
> The characters in the inner (paramter) URL are thus transformed and cause
> the browser to incorrectly break up the 'u' parameter.
>
> My question: How can I prevent cocoon from turning %3f into '?' and %26
> into '&' ?
>
> Ideas?  Thanks!
>
>
> Jeff Sexton
> The ODS Companies
> jsexton@odshp.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org