cloudflare / cloudflare/lol-html

Internal error: entered unreachable code: Got unexpected tag type

Open
#137 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2.1k
Forks
111
PR merge metrics
No merged PRs in 30d

Description

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`).
```rust
fn main() {
let _ = lol_html::rewrite_str(r"

Contributor guide

Open the contributing guide

Research direction

Start by running the supplied Rust program with lol_html::rewrite_str and Settings::default() to reproduce the panic. Inspect parser/tree_builder_simulator/mod.rs at line 214 and trace the unexpected tag type; done means this input returns Err(_) rather than triggering an internal panic.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.