diff --git a/crates/encoding/src/sniff.rs b/crates/encoding/src/sniff.rs index 1672b48..7ac2aff 100644 --- a/crates/encoding/src/sniff.rs +++ b/crates/encoding/src/sniff.rs @@ -188,7 +188,9 @@ fn parse_meta_tag(bytes: &[u8], start: usize) -> Option<(Encoding, usize)> { break; } - let (attr_name, attr_value, new_pos) = parse_attribute(bytes, pos)?; + let Some((attr_name, attr_value, new_pos)) = parse_attribute(bytes, pos) else { + break; + }; pos = new_pos; if ascii_ci_eq_str(&attr_name, "http-equiv") {