Skip to content

Commit 7ec6509

Browse files
author
bors-servo
authored
Auto merge of #344 - mozfreddyb:patch-1, r=jdm
Remove unrequired assertion for invalid markup (fixes #305)
2 parents 56b8b30 + 690af7d commit 7ec6509

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

html5ever/src/tokenizer/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,8 +550,7 @@ impl<Sink: TokenSink> Tokenizer<Sink> {
550550
}
551551

552552
fn discard_char(&mut self, input: &mut BufferQueue) {
553-
let c = self.get_char(input);
554-
assert!(c.is_some());
553+
self.get_char(input);
555554
}
556555

557556
fn emit_error(&mut self, error: Cow<'static, str>) {

html5ever/tests/serializer.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ macro_rules! test_no_parse {
135135

136136

137137
test!(empty, r#""#);
138+
test!(fuzz, "<a a=\r\n", "");
138139
test!(smoke_test, r#"<p><i>Hello</i>, World!</p>"#);
139140

140141
test!(misnest, r#"<p><i>Hello!</p>, World!</i>"#,

0 commit comments

Comments
 (0)