lol-html icon indicating copy to clipboard operation
lol-html copied to clipboard

Internal error: entered unreachable code: Got unexpected tag type

Open plenkl opened this issue 3 years ago • 0 comments

Hi, I found an input that causes an internal error when calling rewrite_str. I am attaching a small program that reproduces the issue (both on 0.3.1 and latest master).

fn main() {
    let _ = lol_html::rewrite_str(r"<math><mi></nß><W@>", lol_html::Settings::default());
}

Output:

thread 'main' panicked at 'internal error: entered unreachable code: Got unexpected tag type', /home/plenkl/.cargo/git/checkouts/lol-html-f516a2180b0bf1e3/9e5f76f/src/parser/tree_builder_simulator/mod.rs:214:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

My expectation is to not trigger an internal error, but rather get an Err(_) returned from rewrite_str.

Let me know if you need any more information. Thanks in advance!

plenkl avatar Jun 08 '22 10:06 plenkl