AEM 6.5 trailing slash on void elements
In my AEM 6.5 template, I have the following code snippet. When it gets rendered on the publish instance, the <br> tag is automatically converted to a self-closing <br/>tag, even though no self-closing tag is present in the original template. The same behavior occurs with the <meta...> tag, which is rendered as <meta..../> the same as other void elements. Could you help me understand why this happens? I’m asking because the W3C Validator flags this as an issue, stating: "Trailing slash on void elements has no effect and interacts badly with unquoted attribute values."
Here’s an example of the rendered output:
<head> <meta charset="UTF-8"/> </head>
Here is my AEM template snippet:
<li>
<sly data-sly-call="${iconTpl.icon @ icon='ui-checkmark', additionalClasses='c-icon--no-inline t-highlight t-highlight--positive'}"></sly>
<a target="_blank" rel="noreferrer" href="https://something" >Bonusprogram.</a>
tralalala<br>
</li>