ICEfaces
  1. ICEfaces
  2. ICE-2732

Parser problem - <a>'s being injected into other components on the page

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.7Beta1
    • Fix Version/s: 1.7RC1, 1.7
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      ANY

      Description

      An empty <a> with href="#" on the page will rendered the following page content inside another <a>. e.g:

      <a href="#"></a>
      <h2>hello</h2>

      will be rendered as:
      <a href="#"></a>
      <h2><a href="#">hello</a></h2>

      ------------

      Might be a more general issue:

      On some pages appeared suddenly links where always have been text before.

      Our finding is that if you have <p>Some text</p> in your xhtml pages it is rendered to <p><a href="">Some text</a></p> in the output.

        Activity

        Hide
        Ken Fyten added a comment -
        Show
        Ken Fyten added a comment - Additional forum thread for this: http://www.icefaces.org/JForum/posts/list/7205.page#30738
        Hide
        Ted Goddard added a comment -

        Does this bug occur with previous versions of ICEfaces?

        Show
        Ted Goddard added a comment - Does this bug occur with previous versions of ICEfaces?
        Hide
        Ted Goddard added a comment -

        Sam, please test DR3 and ICEfaces 1.6.x for this bug to determine when it appeared.

        Show
        Ted Goddard added a comment - Sam, please test DR3 and ICEfaces 1.6.x for this bug to determine when it appeared.
        Hide
        Stéphane Maldini added a comment -

        This issue appeared on 1.7 Beta 1 for me since I used DR#2, DR#3 and Beta 1 with same design.

        Show
        Stéphane Maldini added a comment - This issue appeared on 1.7 Beta 1 for me since I used DR#2, DR#3 and Beta 1 with same design.
        Hide
        Sam Xiao added a comment -

        it's confirmed that the same issue doesn't present in 1.6.2 and DR#3

        Show
        Sam Xiao added a comment - it's confirmed that the same issue doesn't present in 1.6.2 and DR#3
        Hide
        Ted Goddard added a comment -

        The previous implementation used

        private static String TAGS_THAT_CAN_CLOSE_SHORT =
        "img, input, br, hr, meta, base, link, frame, col, area";

        together with the boolean

        TAGS_THAT_CAN_CLOSE_SHORT.indexOf(nodeName) > -1

        But this does not accurately test wether the nodeName is in the list. In particular, "a" appears in "base" although "a" is not explicitly listed. The fix uses a HashSet of nodenames and HashSet.contains().

        Show
        Ted Goddard added a comment - The previous implementation used private static String TAGS_THAT_CAN_CLOSE_SHORT = "img, input, br, hr, meta, base, link, frame, col, area"; together with the boolean TAGS_THAT_CAN_CLOSE_SHORT.indexOf(nodeName) > -1 But this does not accurately test wether the nodeName is in the list. In particular, "a" appears in "base" although "a" is not explicitly listed. The fix uses a HashSet of nodenames and HashSet.contains().

          People

          • Assignee:
            Unassigned
            Reporter:
            Sam Xiao
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: