[
https://issues.apache.org/jira/browse/SLING-9783?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Radu Cotescu closed SLING-9783.
-------------------------------
> The HTL compiler will trigger a NPE if a null value should be written into an
> HTML attribute
> --------------------------------------------------------------------------------------------
>
> Key: SLING-9783
> URL: https://issues.apache.org/jira/browse/SLING-9783
> Project: Sling
> Issue Type: Bug
> Components: Scripting
> Affects Versions: Scripting HTL Compiler 1.2.8-1.4.0
> Reporter: Radu Cotescu
> Assignee: Radu Cotescu
> Priority: Major
> Fix For: Scripting HTL Compiler 1.2.10-1.4.0, Scripting HTL
> Testing Content 1.0.24-1.4.0, Scripting HTL Testing 1.0.26-1.4.0
>
>
> SLING-9696 introduced a side-effect into the HTL compiler, which doesn't
> correctly check if an attribute should be displayed or not when the evaluated
> expression returns a {{null}} value.
> The following code example will generate a NPE:
> {code:html}
> <a href="${pojo.null @ context='unsafe'}>Click</a>
> {code}
> if the {{pojo.null}} actually returns {{null}}, since the {{unsafe}} context
> will return the original passed value.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)