Please go to http://validator.w3.org/ and see for yourself. The & in the URL is 
invalid HTML4.01 as
well as invalid XHTML1.0. It has to be encoded as "&".

Uli

On 05.10.2011 16:36, Radoslav Bielik wrote:
> Uli, thank you for your response. I'm confused though. The ampersand is a
> regular element of the URL and a separator of 2 querystring variables. If it
> was encoded as you suggest, then the target server wouldn't recognize those
> as 2 separate variables (in case of Google Web Fonts those variables are
> "family" and "subset").
>
> Thanks,
> Rado
>
> On Wed, Oct 5, 2011 at 4:28 PM, Ulrich Stärk <u...@spielviel.de> wrote:
>
>> This is absolutely correct behaviour since the url in the href attribute is
>> not encoded as it should
>> be. Replace '&' with '&amp;' and you should be fine.
>>
>> Uli
>>
>> On 05.10.2011 16:14, Immutability wrote:
>>> Hi everyone :)
>>>
>>> While playing with Google Web Fonts today http://www.google.com/webfontI
>>> ran into an interesting issue with Tapestry 5.3 (currently running beta
>> 10).
>>> When a possible entity name is encountered by Tapestry within a template
>>> file (TML) even if it resides within an element attribute, it will raise
>> an
>>> exception. For those unfamiliar with Google Web Fonts, it basically
>>> generates a LINK element pointing to a CSS style hosted by Google. The
>> HREF
>>> contains various stuff such as font family and character sets, here's an
>>> example:
>>>
>>> <link href="
>>>
>> http://fonts.googleapis.com/css?family=Francois+One&subset=latin,latin-ext
>> "
>>> rel="stylesheet" type="text/css"/>
>>>
>>> Now - if you do this, Tapestry will scream:
>>>
>>> Failure parsing template
>> classpath:sk/jazd/kniha/components/SiteBorder.tml:
>>> The reference to entity "subset" must end with the ';' delimiter.
>>>
>>> This seems like a similar issue to the old JavaScript problem, where an
>>> ampersand within a string will also cause an error. What do you guys
>> think?
>>> Is this to be expected, or is it a bug that should be addressed (i.e. not
>>> check entities within quoted element attributes)?
>>>
>>> Of course, as always (well - most of the time) with Tapestry, there's an
>>> easy workaround:
>>>
>>> <link href="${googleFontStyle}" rel="stylesheet" type="text/css"/>
>>>
>>> and in your code:
>>>
>>> public String getGoogleFontStyle()
>>> {
>>> return "
>>>
>> http://fonts.googleapis.com/css?family=Francois+One&subset=latin,latin-ext
>> ";
>>> }
>>>
>>> Rado
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>

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

Reply via email to