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

Enhancement for s:set tag to improve tag body whitespace control.

    XMLWordPrintableJSON

Details

    Description

      Hello Apache Struts Team.

      The current s:set tag performs an automatic trim() on any body content used (when using the <s:set>something</s:set> style with a body).

      The current behaviour limits white-space control for the text body passed to the s:set tag (and makes assigning a single-or-muliple-character whitespace set - e.g. "  " impossible via the tag body)..

      A proposed improvement is to introduce two optional attributes to the s:set tag which will permit the following:

      • Allow an override to prevent the trim() from happening (helps to preserve existing whitespace)..
      • Allow the optional removal of all line-breaks from the tag body content (to allow vertical collapsing of tag body content without impacting anything else).

      There is a PR available with a proposed implementation for the enhancement.  I believe having this additional flexibility will be beneficial for some JSP content generation scenarios.

      Please review and advise if this minor enhancement can be considered for inclusion in 2.5.19 (and then ported forward for 2.6).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              JCjA492kH6347Vb10Ja53 James Chaplin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: