Make sure dot is happy with the provided labels by correctly escaping special characters inside the element descriptions.
This commit is contained in:
parent
22c489f983
commit
926d546c42
1 changed files with 7 additions and 0 deletions
|
@ -38,6 +38,13 @@ impl Element {
|
||||||
|
|
||||||
let mut attributes = Vec::new();
|
let mut attributes = Vec::new();
|
||||||
|
|
||||||
|
let description = description
|
||||||
|
.replace("<", "<")
|
||||||
|
.replace(">", ">")
|
||||||
|
.replace("&", "&")
|
||||||
|
.replace("'", "'")
|
||||||
|
.replace("\"", """);
|
||||||
|
|
||||||
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>}}>"##
|
||||||
));
|
));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue