You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Martin Grotzke <ma...@javakaffee.de> on 2008/03/18 18:27:14 UTC

Re: [T5] How to get ampersand (&) rendered raw / not encoded as &?

Hi,

On Tue, 2008-03-18 at 17:51 +0100, Filip S. Adamsen wrote:
> > I would say that a request parameter appended with &amp;param=value
> > would be seen by the server as amp;param instead of just param.
> 
> W3C says otherwise: "With HTML, the browser translates "&amp;" to "&" so 
> the Web server would only see "&" and not "&amp;" in the query string of 
> the request."
> 
> http://htmlhelp.com/tools/validator/problems.html#amp
> 
> It's not a problem. I see the exact same behaviour and it's working just 
> fine. :)
You're right! It was indeed only an asumption that it would not work, I
wasn't aware that browsers not only translate entities for what is going
to the user but also for such things - what is requested elsewhere...

New day - a new thing learned, great :)

Thanx && cheers,
Martin


On Tue, 2008-03-18 at 17:51 +0100, Filip S. Adamsen wrote:
> Hi,
> 
> On 2008-03-18 15:41, Martin Grotzke wrote:
> > Hi,
> > 
> > On Tue, 2008-03-18 at 14:19 +0100, Chris Lewis wrote:
> >> Martin,
> >>
> >> I'm guessing your mail client converted Josh's message because it
> >> rendered the & in the url as &amp; - just as you have explained and
> >> shown.
> > Ok, thanx :)
> > 
> >>  As he said, url's with &amp; in place of & are actually correct
> >> and should not cause problems (I personally have never seen these urls
> >> cause any).
> > I would say that a request parameter appended with &amp;param=value
> > would be seen by the server as amp;param instead of just param.
> 
> W3C says otherwise: "With HTML, the browser translates "&amp;" to "&" so 
> the Web server would only see "&" and not "&amp;" in the query string of 
> the request."
> 
> http://htmlhelp.com/tools/validator/problems.html#amp
> 
> It's not a problem. I see the exact same behaviour and it's working just 
> fine. :)
> 
> -Filip
> 
> > 
> > Cheers,
> > Martin
> > 
> >> chris
> >>
> >> Martin Grotzke wrote:
> >>> On Mon, 2008-03-17 at 15:24 -0700, Josh Canfield wrote:
> >>>   
> >>>> If I am understanding you correctly, you are getting something like
> >>>> this in your source:
> >>>>
> >>>> <iframe src="http://host/page?arg1=val1&arg2=val2"></iframe>
> >>>>     
> >>> Nope, unfortunately I get src="http://host/page?arg1=val1&arg2=val2"
> >>> so the & is rendered as &amp;
> >>>
> >>> Cheers,
> >>> Martin
> >>>
> >>>
> >>>   
> >>>> That is actually the correct behavior and it shouldn't be causing a
> >>>> problem in your browser. Are you seeing a problem?
> >>>>
> >>>> http://htmlhelp.com/tools/validator/problems.html#amp
> >>>>
> >>>> Josh
> >>>>
> >>>>
> >>>> On Mon, Mar 17, 2008 at 1:18 PM, Martin Grotzke
> >>>> <ma...@javakaffee.de> wrote:
> >>>>     
> >>>>> Hi,
> >>>>>
> >>>>> I have a an html element (iframe) that get's a property of my page class
> >>>>> (the current query string) appended to its src attribute.
> >>>>>
> >>>>> The query string may contain the "&" char, which always gets expanded as
> >>>>> "&amp;". Is there any possibility to prevent T5 from encoding this char?
> >>>>>
> >>>>> Thanx && cheers,
> >>>>> Martin
> >>>>>
> >>>>>
> >>>>>
> >>>>>       
> >>>>     
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>