Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-5441

Trim Spaces should not remove space between expressions

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Scripting JSP 2.1.6
    • None
    • Scripting
    • None

    Description

      Currently if you have the following code in your JSP

      ...
      <i class="coral-Icon <%= isMinimal ? "coral-MinimalButton-icon" : "" %> <%= cmp.getIconClass(icon) %> coral-Icon--size<%= iconSize %>"></i>
      ...
      

      and the property jasper.trimSpaces is set to true, then the space between the first expression and the second expression is completely removed, leading to output like

      <i class="coral-Icon coral-MinimalButton-iconcoral-Icon--close coral-Icon--sizeS"></i>
      

      This should not happen as the space here obviously has a semantical meaning. With jasper.trimSpaces set to false the following correct code is generated:

      <i class="coral-Icon coral-MinimalButton-icon coral-Icon--close coral-Icon--sizeS"></i>
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            kwin Konrad Windszus

            Dates

              Created:
              Updated:

              Slack

                Issue deployment