Backported from trunk (rev #9624):
avoid including non-xml characters in the mi_xmlrpc response