Skip to content

Commit

Permalink
Merge pull request #1209 from blake-regalia/fix/rdf2dot-ampersand-escape
Browse files Browse the repository at this point in the history
rd2dot Escape HTML in node label and URI text
  • Loading branch information
nicholascar authored Dec 27, 2020
2 parents 43cc004 + 1ee96eb commit b557dca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rdflib/tools/rdf2dot.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def color(p):
+ "<font point-size='10' color='#6666ff'>%s</font></td>"
+ "</tr>%s</table> > ] \n"
)
stream.write(opstr % (n, NODECOLOR, label(u, g), u, u, "".join(f)))
stream.write(opstr % (n, NODECOLOR, html.escape(label(u, g)), u, html.escape(u), "".join(f)))

stream.write("}\n")

Expand Down

0 comments on commit b557dca

Please sign in to comment.