We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e5128ec + 245b3f2 commit b4670ecCopy full SHA for b4670ec
cairosvg/parser.py
@@ -387,6 +387,8 @@ def __init__(self, **kwargs):
387
if not bytestring:
388
bytestring = self.fetch_url(
389
parse_url(self.url), 'image/svg+xml')
390
+ if isinstance(bytestring, str):
391
+ bytestring = bytestring.encode('utf-8')
392
if bytestring.startswith(b'\x1f\x8b'):
393
bytestring = gzip.decompress(bytestring)
394
tree = ElementTree.fromstring(
0 commit comments