Skip to content

feat(html): optionally extract authored form values - #4836

Draft
Afloat16 wants to merge 1 commit into
Unstructured-IO:mainfrom
Afloat16:Afloat16/html-form-values-20261121
Draft

Afloat16 wants to merge 1 commit into
Unstructured-IO:mainfrom
Afloat16:Afloat16/html-form-values-20261121

Conversation

@Afloat16

@Afloat16 Afloat16 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add include_form_values=True for HTML documents that contain authored form data. Materialize form labels, textual input values, textarea content and selected option labels before either HTML parser reads the document. The default continues to exclude form controls.

Single selects use their selected label (or first eligible default), while multiple selects include selected labels only. Hidden forms and controls, password/file/action values, placeholder prompts and script-updated state are excluded. Values are serialized as text, preserving document order without treating value contents as markup.

The intentional default exclusion of form content from #3247 remains unchanged; this option is for callers explicitly extracting authored values from saved forms.

Validation

Tests cover both parser versions, default behavior, textual controls, selected/default/multiple options, disabled groups, hidden/password controls and literal markup. Fifteen new regressions fail on main. All 175 new and existing HTML partition tests pass, and whole-repository Ruff 0.15.10 lint and format checks pass. Parser-specific whitespace formatting remains with each parser. Full repository tests remain pending, so this is a draft.

This branch has not been deployed

No deployments
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.

1 participant