From e2603a73f5057da1d538a374f9d07b89b9981511 Mon Sep 17 00:00:00 2001 From: Abdo Date: Thu, 14 Sep 2023 04:34:22 +0300 Subject: [PATCH] Fix unescaped HTML in type-in-the-answer (#2658) --- rslib/src/typeanswer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rslib/src/typeanswer.rs b/rslib/src/typeanswer.rs index 3da3a1c42..a8dbfa89c 100644 --- a/rslib/src/typeanswer.rs +++ b/rslib/src/typeanswer.rs @@ -92,7 +92,7 @@ impl DiffContext { format!( "{}", if self.provided.is_empty() { - self.expected.iter().collect() + htmlescape::encode_minimal(&self.expected.iter().collect::()) } else if self.provided == self.expected { provided } else {