XWIKI-8710: Space export as html seems to be got broken
Revert XWIKI-8168 and properly fix it
(cherry picked from commit 15280ea04f2272edc21f923dda0af5b83abd6efa)