[Python-bugs-list] [ python-Bugs-486527 ] xmlrpclib can produce ill-formed XML

noreply@sourceforge.net noreply@sourceforge.net
Wed, 28 Nov 2001 09:03:49 -0800


Bugs item #486527, was opened at 2001-11-28 09:03
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=486527&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: A.M. Kuchling (akuchling)
>Assigned to: Fredrik Lundh (effbot)
Summary: xmlrpclib can produce ill-formed XML

Initial Comment:
I discovered this when a control character got into a 
string.

import xmlrpclib
data = xmlrpclib.dumps( (chr(17),) )
print data

The resulting XML output isn't well-formed, because 
chr(17) isn't a legal character.  The fix is 
conceptually simple -- just check for illegal 
characters in the dump_string() method -- but I'm not 
sure how to do this check efficiently.  Fredrik, 
would it be OK with you to use a regex?






----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=486527&group_id=5470