[
https://issues.apache.org/jira/browse/SLING-5945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15439097#comment-15439097
]
Konrad Windszus commented on SLING-5945:
----------------------------------------
Actually I was writing the expression directly inside a Text node. It works if
there are no angle brackets being used twice there. Maybe you can at least
improve the exception message. It is not obvious to me that an HTML parser is
active before the Sightly parser kicks in. Is that somewhere documented? If not
could you add that to
https://sling.apache.org/documentation/bundles/scripting/scripting-sightly.html?
> Using opening angle brackets twice in expression language leads to token
> recognition error
> ------------------------------------------------------------------------------------------
>
> Key: SLING-5945
> URL: https://issues.apache.org/jira/browse/SLING-5945
> Project: Sling
> Issue Type: Bug
> Components: Scripting
> Affects Versions: Scripting Sightly Engine 1.0.18
> Reporter: Konrad Windszus
> Assignee: Radu Cotescu
> Fix For: Scripting Sightly Engine 1.0.20
>
>
> The following Sightly expression leads to an exception when used inside a
> block element's content
> {code}
> ${'<{0}> </{0}>' @ format=['myelement'], context='unsafe'}
> {code}.
> The error is
> {code}
> token recognition error at: ''<{0}>' for expression ${'<{0}>
> at
> org.apache.sling.scripting.sightly.impl.engine.UnitLoader.getSourceCodeForScript(UnitLoader.java:135)
> {code}
> On the other hand
> {code}
> ${'<{0} /> ' @ format=['myelement'], context='unsafe'}
> {code}
> works without any issues.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)