Moin uses XML mode serialization. If an empty document is passed on to the conv_serialize function, for example, the output is a single div tag with a self-closing syntax: <div /> which is invalid for non-void tags according to both HTML4 and 5 specs.
There are many side-effects of this problem, like issue
#141 . I have worked around issue #141 for now, by manually detecting <div /> tags in the python source code and replacing them with <div></div>. But this is just a temporary stop-gap measure, and there might be many more bugs which might arise due to non-void tags getting <tag /> like syntax.
We can use HTML mode serialization instead, but that might break other stuff. So, we need to think and discuss on how all of this can be resolved.