[ https://issues.apache.org/jira/browse/SLING-7549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Radu Cotescu resolved SLING-7549. --------------------------------- Resolution: Fixed > <link> tag is not being treated as "self closing" when used in conjunction > with HTL block statements > ---------------------------------------------------------------------------------------------------- > > Key: SLING-7549 > URL: https://issues.apache.org/jira/browse/SLING-7549 > Project: Sling > Issue Type: Bug > Components: Scripting > Affects Versions: Scripting HTL Engine 1.0.32 > Reporter: Paul Bjorkstrand > Assignee: Radu Cotescu > Priority: Major > Fix For: Scripting HTL Compiler 1.0.22-1.4.0 > > > When using HTL block statements some tags that are assumed to be "self > closing" by browsers are not handled in that manner by the HTL engine. This > can cause hard to find problems with the rendering of the page. in this > example, the {{<link>}} tag was the culprit. > I was diagnosing an issue where under a certain set of circumstances all of > my page's css was not being rendered. This happened to be due a {{<link>}} > tag that was not closed, but had a block statement added to it: > {code:java} > <link data-sly-test="${metadata.prerenderUrl}" rel="prerender" > href="${metadata.prerenderUrl}">{code} > That seemingly innocuous tag caused the HTL engine to assume that all > contents following, (until the the parent head closing tag), to be inside > that link tag. > According to the [html5 > spec|https://www.w3.org/TR/2014/REC-html5-20141028/document-metadata.html#the-link-element] > the content of the {{<link>}} element is empty. Nearly every browser in use > today treats {{<link ...>}} the same as {{<link .../>}}. Given this, it is > not a stretch to assume that HTL would treat it in the same manner. > It is my belief that HTL should mimic the html5 specification. At minimum, I > would hope to get a clear answer on which HTML specification it follows, or a > statement that HTL does not/will not follow an HTML specification. > *Note*: I was unsure if this should be something in the HTL spec or in the > implementation. Since I found no reference in the specification regarding > html5/xhtml/html4 compliance, I came here with my request instead. Please let > me know if this is something that should be addressed at the specification > level. -- This message was sent by Atlassian JIRA (v7.6.3#76005)