Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-1818

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: 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 "_").

        Attachments

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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: