we (web engine): Experimental web browser project to understand the limits of Claude
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Review fix: use break instead of ? in parse_meta_tag attribute loop

When parse_attribute returns None (e.g., malformed HTML with bare '='
or '/' not followed by '>'), the previously collected charset info
should be preserved rather than discarded. Using break instead of ?
ensures already-parsed charset/http-equiv attributes are still
evaluated at the end of the function.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+3 -1
+3 -1
crates/encoding/src/sniff.rs
··· 188 188 break; 189 189 } 190 190 191 - let (attr_name, attr_value, new_pos) = parse_attribute(bytes, pos)?; 191 + let Some((attr_name, attr_value, new_pos)) = parse_attribute(bytes, pos) else { 192 + break; 193 + }; 192 194 pos = new_pos; 193 195 194 196 if ascii_ci_eq_str(&attr_name, "http-equiv") {