Fix SVG encoding

This commit is contained in:
Emmanuel Viennet 2021-07-27 14:50:53 +03:00
parent 7e3ac9884c
commit da4cea0316
1 changed files with 2 additions and 1 deletions

View File

@ -1425,7 +1425,8 @@ def graph_parcours(
os.unlink(path)
if format == "svg":
# dot génère un document XML complet, il faut enlever l'en-tête
data = "<svg" + "<svg".join(data.split("<svg")[1:])
data_str = data.decode("utf-8")
data = "<svg" + "<svg".join(data_str.split("<svg")[1:])
# Substitution des titres des URL des aretes pour bulles aide
def repl(m):
return '<a title="%s"' % bubbles[m.group("sd")]