Skip to content

Commit

Permalink
Fix svg escaping
Browse files Browse the repository at this point in the history
Workaround for bodoni/svg#76
  • Loading branch information
konstin committed Jan 27, 2024
1 parent 7393cf4 commit c44e452
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ pub fn plot(
.set("height", layout.bar_height / 2)
.set("fill", config.color_top.to_string())
// Add tooltip
.add(Title::new().add(node::Text::new(format_tooltip(span)))),
// https://github.com/bodoni/svg/issues/76
.add(Title::new().add(node::Text::new(format_tooltip(span).replace("<", "&lt;")))),
)
}

Expand Down

0 comments on commit c44e452

Please sign in to comment.