summaryrefslogtreecommitdiffstats
path: root/Lib/xmlrpc/server.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/xmlrpc/server.py')
-rw-r--r--Lib/xmlrpc/server.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/xmlrpc/server.py b/Lib/xmlrpc/server.py
index 304e218..5b5bf7c 100644
--- a/Lib/xmlrpc/server.py
+++ b/Lib/xmlrpc/server.py
@@ -269,7 +269,7 @@ class SimpleXMLRPCDispatcher:
encoding=self.encoding, allow_none=self.allow_none,
)
- return response.encode(self.encoding)
+ return response.encode(self.encoding, 'xmlcharrefreplace')
def system_listMethods(self):
"""system.listMethods() => ['add', 'subtract', 'multiple']
@@ -622,7 +622,7 @@ class MultiPathXMLRPCServer(SimpleXMLRPCServer):
response = dumps(
Fault(1, "%s:%s" % (exc_type, exc_value)),
encoding=self.encoding, allow_none=self.allow_none)
- response = response.encode(self.encoding)
+ response = response.encode(self.encoding, 'xmlcharrefreplace')
return response
class CGIXMLRPCRequestHandler(SimpleXMLRPCDispatcher):