I am hitting an issue with the content serializers (yeah, yeah, the "burden"). The OutputFormatted flag (from nsIDocumentEncoder) implies wrapping and that's wrong behaviour. Wrapping should only be triggered by the OutputWrap flag IMHO... I'll try to improve that.