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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 1.3.5, 1.4-RC1
    • wicket
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: