You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Szemere Szemere <sz...@googlemail.com> on 2008/02/01 10:06:25 UTC

T5: XML encoding of URLs

I'm having trouble including an image source URL in my .tml files. The URL
has & and ? characters in it. If I use &, then the T5 XML validation
complains that I have unterminated entities (not surprising). However if I
replace & with &amp; (ampersand-"amp"-semicolon) then the whole 5 character
string gets passed through to the browser (ie. not XML decoded), which is
surprising.  Any obvious way to handle this?

Snippet of the code
<img src="http://chart.apis.google.com/chart&amp;quest;chs=800x300" />

I'm on T5.0.7.

Re: T5: XML encoding of URLs

Posted by Howard Lewis Ship <hl...@gmail.com>.
That should be correct, the &amp; inside the src attribute should be
converted, by the browser, back into a single '&' when it sends the
request to fetch the image.

On Feb 1, 2008 1:06 AM, Szemere Szemere <sz...@googlemail.com> wrote:
> I'm having trouble including an image source URL in my .tml files. The URL
> has & and ? characters in it. If I use &, then the T5 XML validation
> complains that I have unterminated entities (not surprising). However if I
> replace & with &amp; (ampersand-"amp"-semicolon) then the whole 5 character
> string gets passed through to the browser (ie. not XML decoded), which is
> surprising.  Any obvious way to handle this?
>
> Snippet of the code
> <img src="http://chart.apis.google.com/chart&amp;quest;chs=800x300" />
>
> I'm on T5.0.7.
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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