Issue Bug Closed

#98463Nu HTML Validator (the one from validator.w3.org) changed how they validate self-closing tags

Lars Peter Søndergaard 09/28/22, 13:07 updated 04/03/25, 20:42

Description

This seems to have been a very recent change, and it causes the validator at validator.w3.org now to warn about a lot of self-closing tags, that should no longer be self-closing.

https://github.com/validator/validator/issues/1430

Mostly affected are instances of <img>, <br>, <link> and <meta>

The canonical <link> ag generated by EXT:seo seems to add />, and all tags added by the TYPO3 MetaTag generators seem to add /> as well, and I couldn’t find a way to prevent that, without having to xclass or similar unpretty solutions.

The TagBuilder, used by e.g. the <f:image> ViewHelper also adds /> on self-closing tags.. which is probably a bit harder to solve, as the TagBuilder could potentially represent any tag.

<br /> tags, output by the RTE are also affected. Not sure if it’s possible to prevent that here with some parseFunc setting.

Greetings

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.