Skip to content

lab-ops-hub: RCDATA/raw-text parity for textarea, iframe, xmp, noembed, noframes (#4008) - #5228

Merged
dezren39 merged 1 commit into
mainfrom
queue/8964-4008-rcdata-parity
Nov 4, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/8964-4008-rcdata-parity

Conversation

@dezren39

@dezren39 dezren39 commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Fixes #4008.

Worker-fallback extractHtml (pkgs/lab-ops-hub/src/lib.ts) now mirrors the container Extractor's HTMLParser modes for the five elements issue #4008 names:

  • textarea is RCDATA: content is character data (entities decoded, markup literal) up to the matching </textarea>, and it contributes body text. The reported case <textarea><script></textarea><p>Article body</p> now yields <script> Article body, identical to the container (the Worker returned empty text).
  • iframe, xmp, noembed, noframes are raw text: content is literal up to the matching close tag (anchors inside never count as links) and is reported verbatim — no entity decoding — as ordinary character data, exactly as HTMLParser delivers it to the container Extractor.
  • Unterminated regions: the container only ever calls feed() (container/app.py never calls close()), so an unclosed raw-text/RCDATA tail stays unflushed and is dropped; the Worker now drops it too for these five elements. Script/style/title EOF handling is unchanged.

Fixtures: 10 new container-verified cases in test/extractor-fixtures.json (the reported example plus at least one per element, an entity-verbatim case, both unclosed cases, and a trailing-attribute close tag), each generated from the container Extractor and pinned in both suites.

One clarification vs the issue text: the acceptance says iframe/xmp/noembed/noframes content is "skipped" — container-verified behavior is that the content is skipped as markup (never parsed for tags/links) but delivered as literal text; the fixtures encode the verified behavior.

Tests (laptop, this branch):

  • npm run test:ts — 99 pass, 0 fail.
  • test_extractor_parity.py — OK (all 39 fixtures, both directions).
  • npm run test:py — 69 tests, 1 pre-existing error in test_container_validate (test_returns_idn_hosts_in_alabel_form, IDNA judging in container/app.py under Python 3.14; that code is untouched by this diff and the deployed container pins Python 3.13).

Queue: task 8964, lane code-n.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 4, 2026 01:12
@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 24 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e1a39a7f-7e3a-4de5-8875-90d1bcc2623e
Commits

Reviewing files that changed from the base of the PR and between a51be0e and 8c1cff9.

Files selected for processing: 2
  • pkgs/lab-ops-hub/src/lib.ts
  • pkgs/lab-ops-hub/test/extractor-fixtures.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T01:14:53.678605Z 8c1cff9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 merged commit 3237ef8 into main Nov 4, 2026
2 checks passed
@dezren39
dezren39 deleted the queue/8964-4008-rcdata-parity branch November 4, 2026 02:10
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

Successfully merging this pull request may close these issues.

lab-ops-hub: Worker-fallback extractor — RCDATA/raw-text modes for textarea, iframe, xmp, noembed, noframes

1 participant