python-wordpress-xmlrpc icon indicating copy to clipboard operation
python-wordpress-xmlrpc copied to clipboard

Character-escape unicode characters automatically

Open maxcutler opened this issue 13 years ago • 0 comments

xmlrpclib won't auto-escape characters that are invalid in XML, which can cause operations to fail when strings contain non-ASCII characters.

This library knows enough about the fields to auto-escape/encode those which can contain arbitrary strings (e.g., WordPressPost.title). Can be as simple as text.encode('ascii', 'xmlcharrefreplace') when building struct.

maxcutler avatar Apr 18 '12 13:04 maxcutler