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

Tag s:form silently rewrites "." in id attibute values

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.8
    • Fix Version/s: Future
    • Component/s: Plugin - Tags
    • Labels:
      None

      Description

      "Affects Version/s" is actually 2.1.8.1.

      In my JSP, I have a <s:form id="some.complicated.value">

      The HTML comes out at <form id="some_complicated_value">.

      The dots in the id value silently get changed to underscores.

      I did not find this replacement documented. Places I looked include http://struts.apache.org/2.1.8.1/docs/form.html and http://struts.apache.org/2.1.8.1/docs/tag-syntax.html and http://struts.apache.org/2.1.8.1/docs/form-tags.html .

      Suggestion:

      Either fix the tags library to not silently rewrite attribute values. This is prefered by this bug reporter.
      If a developer takes the trouble to nail down the id attribute to a specific value, that's the specific value that should be used.

      Or else, if there is a reason for the rewrite, kindly document both the rewrite and the reason.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              andreas.krueger@dv-ratio.com Andreas Kr├╝ger
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: