- Issue created by @heavystonehead
- 🇩🇪Germany jan kellermann
Thank you for reporting. This feature is marked as experimental. We recommend using this temporarily for debugging and discovering sources.
I cannot reproduce in our dev systems.
You can use this extract and try to add parts of your website until it fails:
$html = ' <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Test</title> </head> <body> <h1>Test</h2> </body> </html> '; $dom = new \DOMDocument(); $html = mb_encode_numericentity($html, [0x80, 0x10FFFF, 0, 0x1FFFFF], 'UTF-8'); $dom->loadHTML($html, LIBXML_NOERROR | LIBXML_SCHEMA_CREATE); $html = $dom->saveHTML(); $html = mb_decode_numericentity($html, [0x80, 0x10FFFF, 0, 0x1FFFFF], 'UTF-8'); dpm($html);
Otherwise you can send me the original markup (DM if necessary) and I can have a look. If it is a public website, please post or send me the URL.
- 🇩🇪Germany heavystonehead
I found the issue i have in my html.html.twig template "" instead of "", it disappears when it is written in lowercase
- 🇩🇪Germany jan kellermann
That is correct. Doctype must be uppercase according to the definition of XHTML.
We use existing PHP classes and they expect correctly the Doctype in uppercase.
- 🇩🇪Germany heavystonehead
XHTML needs uppercase but HTML5 is case-insensitively
https://www.w3.org/TR/2011/WD-html5-20110405/syntax.html#the-doctype
- 🇩🇪Germany jan kellermann
@heavystonehead Can you please checkout the MR and give feedback?
If there are problems, we have to switch to
Dom\HTMLDocument
, see https://www.php.net/manual/en/domdocument.loadhtml.php - 🇩🇪Germany heavystonehead
seems to work the code snippet is no longer removed, but transforms doctype from lowercase to uppercase, but that's fine
- 🇩🇪Germany jan kellermann
@heavystonehead Should we wait for a 2nd RTBC or can we merge?
- 🇩🇪Germany heavystonehead
#10 If I interpret that correctly, the problem was only with the lowercase, which is consistently converted to uppercase in the code and also takes other notations into account, such as doCTyp. In this case, I would say you could merge it.
Automatically closed - issue fixed for 2 weeks with no activity.