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

noreply@sourceforge.net noreply@sourceforge.net
Wed, 28 Nov 2001 10:22:37 -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: 3
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?






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

>Comment By: Fredrik Lundh (effbot)
Date: 2001-11-28 10:22

Message:
Logged In: YES 
user_id=38376

I ignored this on purpose: instead of forcing everyone to 
pay a (rather big) performance penalty, the application 
must make sure to use the right data type.  The 
documentation probably needs fixing, though...

</F>

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

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