Properly escape element descriptions
All checks were successful
/ build (push) Successful in 1m7s

Make sure dot is happy with the provided labels by correctly escaping
special characters inside the element descriptions.
This commit is contained in:
Rahix 2025-09-26 00:56:56 +02:00
parent 22c489f983
commit 926d546c42

View file

@ -38,6 +38,13 @@ impl Element {
let mut attributes = Vec::new(); let mut attributes = Vec::new();
let description = description
.replace("<", "&lt;")
.replace(">", "&gt;")
.replace("&", "&amp;")
.replace("'", "&apos;")
.replace("\"", "&quot;");
attributes.push(format!( attributes.push(format!(
r##"label = <{{{{#{issue_number} | {status}}}|<I>{ty}</I>|<B>{description}</B>}}>"## r##"label = <{{{{#{issue_number} | {status}}}|<I>{ty}</I>|<B>{description}</B>}}>"##
)); ));