Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3429

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

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.1.8.1
    • Fix Version/s: 2.5.x
    • 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.

        Attachments

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

          Activity

            People

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

              Dates

              • Created:
                Updated: