From 83f3209740844cda644fe4c3c03f947c5576ba4f Mon Sep 17 00:00:00 2001 From: mooons <10822203+mooons@users.noreply.github.com> Date: Thu, 25 May 2023 17:30:13 -0700 Subject: [PATCH] Escape backslash --- src/pasta.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pasta.rs b/src/pasta.rs index 81c68442..7899937d 100644 --- a/src/pasta.rs +++ b/src/pasta.rs @@ -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() } }