Struts 2
  1. Struts 2
  2. WW-3429

<input> tag generated by <s:checkbox> produce HTML warning in validators

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.1.8.1
    • Fix Version/s: 2.5
    • Component/s: Core Interceptors, Other
    • Environment:

      Apache Tomcat 5.5, 6.0.18 running on Win 32 and Fedora Code Linux x86_64. Actually, bug is relevant to any environment.

    • Flags:
      Patch

      Description

      <s:checkbox> tag with default xhtml theme produce an <input> tag, like that one:

      <input type="hidden" id="_checkbox_is_vacancy_open" name="_checkbox_vacancy.open" value="true" />

      produces HTML Tidy validator warning about an attribute name and ID starting with two "_" signs. So, here is a patch I suggest to resolve this issue:

      I changed FreeMarker template and a checkbox interceptor code in such a way that prefix of that input no longer produce warning.

      1. CheckboxInterceptor.java
        4 kB
        Alexey Malev
      2. checkbox.ftl
        2 kB
        Alexey Malev
      3. diff.txt
        2 kB
        Alexey Malev

        Activity

        Alexey Malev created issue -
        Alexey Malev made changes -
        Field Original Value New Value
        Attachment CheckboxInterceptor.java [ 12441172 ]
        Attachment checkbox.ftl [ 12441173 ]
        Alexey Malev made changes -
        Attachment diff.txt [ 12441176 ]
        Lukasz Lenart made changes -
        Fix Version/s 2.3.x [ 12319176 ]
        Lukasz Lenart made changes -
        Assignee Lukasz Lenart [ lukaszlenart ]
        Lukasz Lenart made changes -
        Fix Version/s 2.3.2 [ 12319199 ]
        Fix Version/s 2.3.x [ 12319176 ]
        Lukasz Lenart made changes -
        Fix Version/s 2.3.x [ 12319176 ]
        Fix Version/s 2.3.2 [ 12319199 ]
        Lukasz Lenart made changes -
        Fix Version/s 2.5 [ 12324447 ]
        Fix Version/s 2.3.18 [ 12319176 ]

          People

          • Assignee:
            Lukasz Lenart
            Reporter:
            Alexey Malev
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development