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. MarkupIdTestPageExpectedResult.html
        0.0 kB
        Bruno Borges
      2. MarkupIdTestPage.java
        1 kB
        Bruno Borges
      3. MarkupIdTestPage.html
        0.0 kB
        Bruno Borges
      4. patch-1818.diff
        1 kB
        Bruno Borges

        Activity

        No work has yet been logged on this 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