Skip to content

fix(form): preserve whitespace in field names - #893

Open
Muneer Alam (Muneer320) wants to merge 1 commit into
microsoft:mainfrom
Muneer320:fix/form-field-name-whitespace
Open

Muneer Alam (Muneer320) wants to merge 1 commit into
microsoft:mainfrom
Muneer320:fix/form-field-name-whitespace

Conversation

@Muneer320

Copy link
Copy Markdown
Contributor

Overview

Form serialization trims field names, so field and field are sent under the same name. Encode the original name in the string, object and non-parsable-object writer paths.

Regressions cover leading/trailing ASCII whitespace, whitespace-only names, Unicode whitespace, distinct-field preservation and public parser lookup. Ordinary names and names requiring percent-encoding remain covered. Existing empty/absent input behavior is unchanged.

Related Issue

Fixes #892.

Testing Instructions

  • From packages/serialization/form, install requirements-dev.txt and run pytest.
  • Before the source fix, eight new regression cases fail and four new controls pass.
  • After the fix, all 149 form-package tests pass locally on Windows/CPython 3.13.7.
  • YAPF, isort and mypy pass. Pylint exits 0 with the existing suggestion-mode configuration diagnostic; its optional cache could not be written in the local sandbox.

The public reproducer and tests use local serialization only. No service calls or credentials are required.

@Muneer320
Muneer Alam (Muneer320) requested a review from a team as a code owner November 11, 2026 20:27
Copilot AI balanced review requested due to automatic review settings November 11, 2026 20:27
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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

Status: No status

Development

Successfully merging this pull request may close these issues.

Form serialization trims field names and merges distinct fields

2 participants