File tree Expand file tree Collapse file tree 2 files changed +2
-0
lines changed
Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ def to_xml(elm, lvl=0):
109109 if elm is None : return ''
110110 if isinstance (elm , tuple ): return '\n ' .join (to_xml (o ) for o in elm )
111111 if hasattr (elm , '__ft__' ): elm = elm .__ft__ ()
112+ if isinstance (elm , bytes ): return elm .decode ('utf-8' )
112113 sp = ' ' * lvl
113114 if not isinstance (elm , list ): return f'{ _escape (elm )} \n '
114115
Original file line number Diff line number Diff line change 330330 " if elm is None: return ''\n " ,
331331 " if isinstance(elm, tuple): return '\\ n'.join(to_xml(o) for o in elm)\n " ,
332332 " if hasattr(elm, '__ft__'): elm = elm.__ft__()\n " ,
333+ " if isinstance(elm, bytes): return elm.decode('utf-8')\n " ,
333334 " sp = ' ' * lvl\n " ,
334335 " if not isinstance(elm, list): return f'{_escape(elm)}\\ n'\n " ,
335336 " \n " ,
You can’t perform that action at this time.
0 commit comments