Skip to content

Commit

Permalink
Escape backslash
Browse files Browse the repository at this point in the history
  • Loading branch information
mooons committed May 26, 2023
1 parent b6841a5 commit 83f3209
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pasta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl Pasta {
}

pub fn content_escaped(&self) -> String {
html_escape::encode_text(&self.content.replace('`', "\\`").replace('$', "\\$")).to_string()
html_escape::encode_text(&self.content.replace('\\', "\\\\").replace('`', "\\`").replace('$', "\\$")).to_string()
}
}

Expand Down

0 comments on commit 83f3209

Please # to comment.