Comment 1 for bug 517064

Revision history for this message
codedread (codedread) wrote :

Thanks for catching this, Nico!

I have fixed this in my local copy. Will checkin tonight, but for now you can replace the makeWellFormed() function with this:

def makeWellFormed(str):
 newstr = ''
 xml_ents = { '<':'&lt;', '>':'&gt;', '&':'&amp;', "'":'&apos;', '"':'&quot;'}
 for c in str:
  if c in xml_ents:
   newstr += xml_ents[c]
  else:
   newstr += c

 return newstr

Sorry about the trouble.