Skip to content

Commit

Permalink
fix: escape ampersands in text
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcur committed Jul 1, 2024
1 parent 407dcba commit daba56b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion termsnap-lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ fn fmt_text(
}
}
// escape tag opening
'<' => f.write_str("&#x3C;")?,
'<' => f.write_str("&lt;")?,
'&' => f.write_str("&amp;")?,
c => f.write_char(c)?,
}

Expand Down

0 comments on commit daba56b

Please sign in to comment.