Fix issue #505: DIET: doctype is actually ignored
Merge pull request #509 from nazriel/issue505

Fix issue #505: DIET: doctype is actually ignored