Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal error: entered unreachable code: Got unexpected tag type #137

Open
plenkl opened this issue Jun 8, 2022 · 0 comments
Open

Internal error: entered unreachable code: Got unexpected tag type #137

plenkl opened this issue Jun 8, 2022 · 0 comments

Comments

@plenkl
Copy link

plenkl commented Jun 8, 2022

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant