Skip to content

Commit 69c0686

Browse files
committed
do not remove <meta charset="utf-8">
Fixes #10163, fixes #10158
1 parent c312026 commit 69c0686

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

crates/html/src/optimize.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ pub fn optimize<'arena>(
237237
}
238238
}
239239
expanded_name!(html "meta") => {
240-
enumerated(node, expanded_name!("", "charset"), "utf-8", &options);
241240
if let NodeData::Element { attrs, .. } = &node.data {
242241
if attrs.borrow().is_empty() {
243242
node.detach();
@@ -807,7 +806,7 @@ mod tests {
807806
</body>
808807
</html>
809808
"#,
810-
r#"<!doctype html><html><head><title>Test</title></head><body>
809+
r#"<!doctype html><html><head><meta charset="utf-8"><title>Test</title></head><body>
811810
<p>Test</p>
812811
<p>Foo</p>
813812

0 commit comments

Comments
 (0)