Re: Problems with & handling between RI and Facelets
https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=381
Ryan Lubke wrote:
> Jacob Hookom wrote:
>> But then what about legit XHTML based on the Renderkit's content type
>> echoed back the the ResponseWriter/ViewHandler?
> For the XHTML case, I'm fine with rendering entities, but for the
> standard HTML case, we should follow the spec and
> not escape.
>>
>> Ryan Lubke wrote:
>>> Michael Youngstrom wrote:
>>>>>
>>>>> For the HTML case, it's pretty clear, we need to render '&'.
>>>>> However,
>>>>> I think if the content-type is determined to be xhtml, I don't see
>>>>> why we
>>>>> couldn't render '&' instead.
>>>>>
>>>>
>>>> Does some browser break if you render an &?
>>> Not that I'm aware of. The Renderkit docs are clear that '&' is
>>> not to be encoded
>>>
>>> <quote>
>>> Renders an HTML "img" element. Render the clientId as the value of
>>> the "id" attribute. Render the value of the component as the value
>>> of the "src" attribute, after passing it to the getResourceURL()
>>> method of the ViewHandler for this application, and passing the
>>> result through the encodeResourceURL() method of the
>>> ExternalContext. When handling the "src" attribute, the value must
>>> not be escaped. For example, & must not be turned into &. If the
>>> "styleClass" attribute is specified, render its value as the value
>>> of the "class" attribute.
>>> </quote>
>>>
>>>
>>>>
>>>> I created a simple html page (below) with both cases in an anchor and
>>>> they both seem to work fine in Firefox and IE 6:
>>>
>>>>
>>>> ---------------test.html---------------
>>>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>>>> <html>
>>>> <head>
>>>> <meta http-equiv="Content-Type" content="text/html;
>>>> charset=ISO-8859-1">
>>>> </head>
>>>> <body>
>>>> <a href="http://www.google.com?joe=10&bob=5">
>>>> Test entity
>>>> </a>
>>>> <a href="http://www.google.com?joe=10&bob=5">
>>>> Test non entity
>>>> </a>
>>>> </body>
>>>> </html>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
>>> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
>> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>