Skip to content

Commit 94e1504

Browse files
committed
Fix for #278 missing html escaping for dot
It was possible to inject html markup in the label of a dot node. This lead to the error observed in #278. This fix is currently only for the label attribute. Other attribute might be affected as well.
1 parent da8a2c6 commit 94e1504

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytm/pytm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,7 @@ def display_name(self):
14961496
return self.name
14971497

14981498
def _label(self):
1499-
return "\\n".join(wrap(self.display_name(), 18))
1499+
return "\\n".join(wrap(html.escape(self.display_name()), 18))
15001500

15011501
def _shape(self):
15021502
return "square"

0 commit comments

Comments
 (0)