[
https://issues.apache.org/jira/browse/SLING-12808?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Konrad Windszus updated SLING-12808:
------------------------------------
Description:
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.
was:
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.
> 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)