diff --git a/core/src/html/text_format.rs b/core/src/html/text_format.rs
index 02b7d9d90..d1a8aaf31 100644
--- a/core/src/html/text_format.rs
+++ b/core/src/html/text_format.rs
@@ -583,6 +583,7 @@ impl FormatSpans {
};
let mut reader = Reader::from_reader(&raw_bytes[..]);
+ reader.check_end_names(false);
let mut buf = Vec::new();
loop {
match reader.read_event(&mut buf) {