From 181ebb3a63145428f031336c6079d38aee613ee0 Mon Sep 17 00:00:00 2001 From: Jade Date: Thu, 9 Mar 2023 20:05:57 +0100 Subject: [PATCH] Fix XSS attack (again) Now escaping only for slashes, since HTML is apparently case insensitive and using a script closing tag that wasn't entirely lowercase bypassed the earlier fix. --- src/pasta.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pasta.rs b/src/pasta.rs index b771c66..38a215a 100644 --- a/src/pasta.rs +++ b/src/pasta.rs @@ -155,7 +155,7 @@ impl Pasta { self.content .replace('`', "\\`") .replace('$', "\\$") - .replace("