File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -438,7 +438,7 @@ def main(self):
438438
439439 def handle_xmlrpc (self ):
440440 if self .env .get ('CONTENT_TYPE' ) != 'text/xml' :
441- self .write ("This is the endpoint of Roundup <a href='" +
441+ self .write (b "This is the endpoint of Roundup <a href='" +
442442 "http://www.roundup-tracker.org/docs/xmlrpc.html'>" +
443443 "XML-RPC interface</a>." )
444444 return
@@ -479,7 +479,7 @@ def handle_xmlrpc(self):
479479 self .instance .actions ,
480480 self .translator ,
481481 allow_none = True )
482- output = handler .dispatch (input )
482+ output = s2b ( handler .dispatch (input ) )
483483
484484 self .setHeader ("Content-Type" , "text/xml" )
485485 self .setHeader ("Content-Length" , str (len (output )))
@@ -1811,7 +1811,9 @@ def write_html(self, content):
18111811 # client doesn't care about content
18121812 return
18131813
1814- if self .charset != self .STORAGE_CHARSET :
1814+ if sys .version_info [0 ] > 2 :
1815+ content = content .encode (self .charset , 'xmlcharrefreplace' )
1816+ elif self .charset != self .STORAGE_CHARSET :
18151817 # recode output
18161818 content = content .decode (self .STORAGE_CHARSET , 'replace' )
18171819 content = content .encode (self .charset , 'xmlcharrefreplace' )
You can’t perform that action at this time.
0 commit comments