5 ms·
You seem to misunderstand what's going on here. HTML5 explicitly lists which tags are optional in what context, and the document style presented in the link tak
by TheRealPomax 10y ago
You seem to misunderstand what's going on here. HTML5 explicitly lists which tags are optional in what context, and the document style presented in the link takes that fact and recommends thus removing any optional tag to save data over the wire. There is nothing "malformed" about this, this is literally doing what the spec says is explicitly valid. Any proper HTML5 parser regardless, of which language its written in or for, should be able to parse HTML5 with optional tags omitted perfectly fine.
If PHP's DOM functions don't work for it, then PHP's DOM functions aren't HTML5 spec compliant, and that should be filed as issues against PHP and fixed by its developers.