Fix unescaped HTML in type-in-the-answer (#2658)

This commit is contained in:
Abdo 2023-09-14 04:34:22 +03:00 committed by GitHub
parent 120c6e165c
commit e2603a73f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,7 +92,7 @@ impl DiffContext {
format!(
"<code id=typeans>{}</code>",
if self.provided.is_empty() {
self.expected.iter().collect()
htmlescape::encode_minimal(&self.expected.iter().collect::<String>())
} else if self.provided == self.expected {
provided
} else {