Closed mrkskwsnck closed 2 years ago
Thanks @mrkskwsnck ,
after reading through your explanations (and as several issues like this have been reported throughout the last years), I had a closer look at what is happening here.
I finally saw that there was a really old bug which assumed that the document has a plain document tag without any classes or other attributes. If this was not the case, the extraction of the document content failed in the way how you saw it.
I have now modified these old content extraction lines and have changed them so that they use the DOMDocument API as well. This was done in f7db89c7c78fafebca2fc22dbddefaf9fb2e765a for 3.11 and backported to 3.10 and 3.9.
I will release a new version on moodle.org shortly.
According to the example at Creating static page documents I encountered a bug regarding a missing CSS class of the body tag, mentioned at Styling static pages.
TL;DR
With declared but missing CSS class a corrupt document declaration gets rendered!
In more detail
Document foo.html
Rendered document OK
Document bar.html
¡With declared CSS class not being defined anywhere!
Rendered document FAIL
Rendered html output