Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex Henrie
graph-tool
Commits
36c61ec2
Commit
36c61ec2
authored
Feb 16, 2021
by
Tiago Peixoto
Browse files
graphviz_draw(): fix encoding bug
This fixes issue #687
parent
4908e139
Pipeline
#877
passed with stage
in 108 minutes
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/draw/graphviz_draw.py
View file @
36c61ec2
...
...
@@ -91,12 +91,12 @@ except OSError:
def
htmlize
(
elem
,
val
):
if
len
(
val
)
>=
2
and
val
[
0
]
==
"<"
and
val
[
-
1
]
==
">"
:
g
=
libgv
.
agraphof
(
elem
)
return
ctypes
.
string_at
(
libgv
.
agstrdup_html
(
g
,
str
(
val
[
1
:
-
1
]).
encode
(
"utf8"
)))
return
ctypes
.
string_at
(
libgv
.
agstrdup_html
(
g
,
str
(
val
[
1
:
-
1
]).
encode
(
"utf8"
)))
.
decode
(
"utf8"
)
return
val
def
aset
(
elem
,
attr
,
value
):
v
=
htmlize
(
elem
,
str
(
value
))
v
=
htmlize
(
elem
,
str
(
value
))
.
encode
(
"utf8"
)
libgv
.
agsafeset
(
elem
,
str
(
attr
).
encode
(
"utf8"
),
v
,
v
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment