After digging around a bit, we found out that the headContribution tag uses an XMLScanner to parse its element, and of course, as it is XML, HTML entities like ä or HTML void tags are no valid XML.
Is there a straightforward way to make the headContribution parser not fail when encountering HTML entities or void elements?
Thanks for the suggestion. However, I cannot really seem to get this working.
The “<![CDATA[” block seems to be illegal when trying to surround the whole meta tag. The implementation seems to only allow !DOCTYPE and comments there, see XMLDocumentScannerImpl::829ff.
Now that I know that I can only pass valid XML, it makes sense that no void HTML elements are allowed in headContributions (HTML’s tag is a void element and breaks headContribution rendering if the closing / is omitted).