[
https://issues.apache.org/jira/browse/SLING-12808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17954642#comment-17954642
]
Konrad Windszus commented on SLING-12808:
-----------------------------------------
I was not aware that the whitespace behaviour of HTML elements could be
modified with CSS
(https://developer.mozilla.org/en-US/docs/Web/CSS/white-space) on client-side.
Given that there is no need to do escaping of spaces on the server-side.
> HTL display context "text" doesn't encode spaces
> ------------------------------------------------
>
> Key: SLING-12808
> URL: https://issues.apache.org/jira/browse/SLING-12808
> Project: Sling
> Issue Type: Bug
> Components: HTL
> Reporter: Konrad Windszus
> Priority: Major
>
> According to
> https://github.com/adobe/htl-spec/blob/1.4/SPECIFICATION.md#121-display-context
> the context {{text}} should be used ...
> bq. for simple HTML content - Encodes all HTML
> However this doesn't escape regular spaces. Particularly not consecutive
> spaces which are otherwise rendered as a single space as mandated by the HTML
> spec. I think this context needs to replace at least all leading/tailing
> spaces with {{&npsp;}} and also multiple consecutive spaces appearing
> anywhere else. Otherwise the given text will not be displayed as is
> (unmodified) to the end user.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)