Wicket
  1. Wicket
  2. WICKET-1818

wicket:id attribute with a value containing spaces generates invalid markup

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.5, 1.4-RC1
    • Component/s: wicket
    • Labels:
      None

      Description

      HTML:
      <span wicket:id="foo bar"></span>

      Java:
      Label label = new Label("foo bar", "lol");
      label.setOutputMarkupId(true);

      Generates markup:
      <span id="foo bar">lol</span>

      Expected:
      <span id="foo_bar">lol</span>

      When wicket generates wicket:id attributes it should replace spaces with some appropriate valid character (like underscore "_").

      1. patch-1818.diff
        1 kB
        Bruno Borges
      2. MarkupIdTestPageExpectedResult.html
        0.0 kB
        Bruno Borges
      3. MarkupIdTestPage.java
        1 kB
        Bruno Borges
      4. MarkupIdTestPage.html
        0.0 kB
        Bruno Borges

        Activity

        Igor Vaynberg made changes -
        Assignee Igor Vaynberg [ ivaynberg ]
        Fix Version/s 1.5-M1 [ 12313078 ]
        Resolution Fixed [ 1 ]
        Fix Version/s 1.3.6 [ 12313176 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Bruno Borges made changes -
        Attachment MarkupIdTestPageExpectedResult.html [ 12390091 ]
        Bruno Borges made changes -
        Attachment MarkupIdTestPage.java [ 12390090 ]
        Bruno Borges made changes -
        Attachment MarkupIdTestPage.html [ 12390089 ]
        Bruno Borges made changes -
        Attachment patch-1818.diff [ 12390088 ]
        Kare Nuorteva made changes -
        Field Original Value New Value
        Priority Major [ 3 ] Trivial [ 5 ]
        Kare Nuorteva created issue -

          People

          • Assignee:
            Igor Vaynberg
            Reporter:
            Kare Nuorteva
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development