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!( format!(
"<code id=typeans>{}</code>", "<code id=typeans>{}</code>",
if self.provided.is_empty() { if self.provided.is_empty() {
self.expected.iter().collect() htmlescape::encode_minimal(&self.expected.iter().collect::<String>())
} else if self.provided == self.expected { } else if self.provided == self.expected {
provided provided
} else { } else {