Title: HTML parser crash: HTML_BOGUS cast failure on '<' character in text content · Issue #8363 · biomejs/biome · GitHub
Open Graph Title: HTML parser crash: HTML_BOGUS cast failure on '<' character in text content · Issue #8363 · biomejs/biome
X Title: HTML parser crash: HTML_BOGUS cast failure on '<' character in text content · Issue #8363 · biomejs/biome
Description: Environment Biome version: 2.3.8 Node.js version: v25.2.1 OS: macOS Darwin 25.1.0 (darwin-arm64) Description When running biome check on HTML files, Biome crashes with an internal error when it encounters a < character followed by a numb...
Open Graph Description: Environment Biome version: 2.3.8 Node.js version: v25.2.1 OS: macOS Darwin 25.1.0 (darwin-arm64) Description When running biome check on HTML files, Biome crashes with an internal error when it enc...
X Description: Environment Biome version: 2.3.8 Node.js version: v25.2.1 OS: macOS Darwin 25.1.0 (darwin-arm64) Description When running biome check on HTML files, Biome crashes with an internal error when it enc...
Opengraph URL: https://github.com/biomejs/biome/issues/8363
X: @github
Domain: redirect.github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"HTML parser crash: HTML_BOGUS cast failure on '\u003c' character in text content","articleBody":"## Environment\n\n- **Biome version**: 2.3.8\n- **Node.js version**: v25.2.1\n- **OS**: macOS Darwin 25.1.0 (darwin-arm64)\n\n## Description\n\nWhen running `biome check` on HTML files, Biome crashes with an internal error when it encounters a `\u003c` character followed by a number in text content (e.g., `\u003c12 months`).\n\nWhile Biome correctly identifies this as a parse error (it expects `\u003c` to start a tag), the internal handling causes a thread panic with `HTML_BOGUS` cast failure.\n\n## Error Message\n\n```\nBiome encountered an unexpected error\n\nThis is a bug in Biome, not an error in your code, and we would appreciate it if you could report it to https://github.com/biomejs/biome/issues/ along with the following information to help us fixing the issue.\n\nSource Location: /Users/runner/work/biome/biome/crates/biome_rowan/src/ast/mod.rs:206:13\nThread Name: biome::workspace_worker_0\nMessage: Tried to cast node with kind HTML_BOGUS as \"biome_html_syntax::generated::nodes::HtmlRoot\" but was unable to cast\n```\n\n## Minimal Reproduction\n\nCreate a file `test.html`:\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n \u003ctitle\u003eTest\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n \u003cdiv\u003eTarget \u003c12 months\u003c/div\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nRun:\n```bash\nnpx @biomejs/biome check test.html\n```\n\nThe parse error is expected (Biome interprets `\u003c12` as an invalid tag start), but the crash with `HTML_BOGUS` cast failure should not occur.\n\n## Expected Behavior\n\nBiome should report the parse error gracefully without crashing. The error message for the parse issue is fine:\n\n```\ntest.html:7:17 parse ━━━━━━━━━━━━━━━━━━━━━━━━\n\n × Expected an attribute but instead found '\u003c'.\n\n \u003e 7 │ \u003cdiv\u003eTarget \u003c12 months\u003c/div\u003e\n │ ^\n```\n\nBut after reporting this, it should continue processing without the internal `HTML_BOGUS` cast failure.\n\n## Additional Context\n\n- The error occurred multiple times (4 times in my case) when running on a directory with multiple HTML files containing similar patterns\n- No `biome.json` configuration file was present (default settings)\n- The `\u003c` followed by a number pattern (like `\u003c12`) is common in content discussing metrics, comparisons, or mathematical expressions","author":{"url":"https://github.com/aledlie","@type":"Person","name":"aledlie"},"datePublished":"2025-12-04T20:01:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/8363/biome/issues/8363"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e57becd1-9c10-6705-60f6-37b1fc0a9186 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D8CE:1A6C93:361C1C0:47D8497:6A655D46 |
| html-safe-nonce | b541dda581fbc3cf549c452b64f69bf7afdf9a4a2cde41d59cebd6885a5440ae |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOENFOjFBNkM5MzozNjFDMUMwOjQ3RDg0OTc6NkE2NTVENDYiLCJ2aXNpdG9yX2lkIjoiODc5ODkxOTE2NDAxMzQwMzQ2MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6c41ece3f58886c1ac0320ea615886526eacdef95c04e5465c0141aa9c911969 |
| hovercard-subject-tag | issue:3696311194 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/biomejs/biome/8363/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f9a407838305f8a539b2ee9b37bd308906501dac094012ce8f0616c8e63bcc30/biomejs/biome/issues/8363 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f9a407838305f8a539b2ee9b37bd308906501dac094012ce8f0616c8e63bcc30/biomejs/biome/issues/8363 |
| og:image:alt | Environment Biome version: 2.3.8 Node.js version: v25.2.1 OS: macOS Darwin 25.1.0 (darwin-arm64) Description When running biome check on HTML files, Biome crashes with an internal error when it enc... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | aledlie |
| hostname | github.com |
| expected-hostname | github.com |
| None | 52c76df668885aaff23b50bdca1fa1ea44ac9c1553e888ebc70ff1e4daa4625b |
| turbo-cache-control | no-preview |
| go-import | github.com/biomejs/biome git https://github.com/biomejs/biome.git |
| octolytics-dimension-user_id | 140182603 |
| octolytics-dimension-user_login | biomejs |
| octolytics-dimension-repository_id | 671654508 |
| octolytics-dimension-repository_nwo | biomejs/biome |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 671654508 |
| octolytics-dimension-repository_network_root_nwo | biomejs/biome |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 309153364422b3c499922d1a2a6404910a58ed8e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width