You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Manfred Geiler (JIRA)" <de...@myfaces.apache.org> on 2007/11/21 13:33:44 UTC

[jira] Created: (MYFACES-1774) HtmlLinkRenderer should output & instead of & as the url param separator within href attribute according to HTML Spec

HtmlLinkRenderer should output &amp; instead of & as the url param separator within href attribute according to HTML Spec
-------------------------------------------------------------------------------------------------------------------------

                 Key: MYFACES-1774
                 URL: https://issues.apache.org/jira/browse/MYFACES-1774
             Project: MyFaces Core
          Issue Type: Bug
          Components: General, JSR-127, JSR-252
    Affects Versions:  1.2.0, 1.1.5
            Reporter: Manfred Geiler
            Assignee: Manfred Geiler
            Priority: Minor


Currently a <h:outputLink> with nested <f:param> components is rendered as
  <a href="somepage?foo=1&bar=2">...</a>

According to http://www.w3.org/TR/html401/ the character entity "&amp;" should be used instead of "&":
"Authors should use "&amp;" (ASCII decimal 38) instead of "&" to avoid confusion with the beginning of a character reference (entity reference open delimiter). Authors should also use "&amp;" in attribute values since character references are allowed within CDATA attribute values."

Though current browsers seem to have no problem with "&" characters within href attributes, this issue gets serious when using XHTML. Not using the character entity "&amp;" instead of "&" leads to invalid (not well-formed) XML data!
Therefore I think we should fix this.

BTW, the RI renders the wrong "&" as well.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1774) HtmlLinkRenderer should output & instead of & as the url param separator within href attribute according to HTML Spec

Posted by "Ryan Lubke (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545318 ] 

Ryan Lubke commented on MYFACES-1774:
-------------------------------------

Actually, if the response content type is xhtml, the RI will render &amp;, otherwise it will render '&'

> HtmlLinkRenderer should output &amp; instead of & as the url param separator within href attribute according to HTML Spec
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1774
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1774
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General, JSR-127, JSR-252
>    Affects Versions: 1.1.5,  1.2.0
>            Reporter: Manfred Geiler
>            Assignee: Manfred Geiler
>            Priority: Minor
>
> Currently a <h:outputLink> with nested <f:param> components is rendered as
>   <a href="somepage?foo=1&bar=2">...</a>
> According to http://www.w3.org/TR/html401/ the character entity "&amp;" should be used instead of "&":
> "Authors should use "&amp;" (ASCII decimal 38) instead of "&" to avoid confusion with the beginning of a character reference (entity reference open delimiter). Authors should also use "&amp;" in attribute values since character references are allowed within CDATA attribute values."
> Though current browsers seem to have no problem with "&" characters within href attributes, this issue gets serious when using XHTML. Not using the character entity "&amp;" instead of "&" leads to invalid (not well-formed) XML data!
> Therefore I think we should fix this.
> BTW, the RI renders the wrong "&" as well.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1774) HtmlLinkRenderer should output & instead of & as the url param separator within href attribute according to HTML Spec

Posted by "Manfred Geiler (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12544732 ] 

Manfred Geiler commented on MYFACES-1774:
-----------------------------------------

We should introduce a config param as suggested by Mario:
http://www.nabble.com/Rendering-%22-amp-%22-instead-of-%22-%22-for-href-attribute-tf4849854.html

> HtmlLinkRenderer should output &amp; instead of & as the url param separator within href attribute according to HTML Spec
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1774
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1774
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General, JSR-127, JSR-252
>    Affects Versions: 1.1.5,  1.2.0
>            Reporter: Manfred Geiler
>            Assignee: Manfred Geiler
>            Priority: Minor
>
> Currently a <h:outputLink> with nested <f:param> components is rendered as
>   <a href="somepage?foo=1&bar=2">...</a>
> According to http://www.w3.org/TR/html401/ the character entity "&amp;" should be used instead of "&":
> "Authors should use "&amp;" (ASCII decimal 38) instead of "&" to avoid confusion with the beginning of a character reference (entity reference open delimiter). Authors should also use "&amp;" in attribute values since character references are allowed within CDATA attribute values."
> Though current browsers seem to have no problem with "&" characters within href attributes, this issue gets serious when using XHTML. Not using the character entity "&amp;" instead of "&" leads to invalid (not well-formed) XML data!
> Therefore I think we should fix this.
> BTW, the RI renders the wrong "&" as well.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.