> On second thought this "repairing" is going on in the parser here, while the "add space after ]]" only happens in the exported entities.xml ... maybe this "fixing" should be done in the ConfluenceInputWikiStream in the wikistream-module instead, as this broken stuff is actually not in the confluence/xhtml format, but happens on export. (I.e. if looking at the stored data inside confluence, there is no extra spaces after ]], they get added on export.)

You are probably right, I did not noticed it.