Closed bartoszWesolowski closed 3 years ago
@bartoszWesolowski, this looks like an implementation bug rather than a spec one. I opened https://issues.apache.org/jira/browse/SLING-10177 for it.
Cool, thanks @raducotescu
@bartoszWesolowski, after a second look at this I can actually confirm that what you're reporting is not a bug. In the HTML 5 specification, specifically in the HTML syntax chapter dedicated to attributes [0], there's this paragraph:
There must never be two or more attributes on the same start tag whose names are an ASCII case-insensitive match for each other.
In this case, you essentially have two data-sly-attribute
attributes on the same start tag.
[0] - https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
When multiple
data-sly-attribute="${model.map}"
are used on single HTL element only the last one is evaluated. Given that themodel
andmodel2
have a methodmap
that return a String -> String map the following HTL code will not render attributes defined inmodel2.map
Expected Behaviour
Expected HTML output
Actual Behaviour
Actual HTL output
Platform and Version
AEM 6.5.6