Skip to content

Issue #809 - Warn or throw an error on an invalid submission_url#841

Open
Garen6 wants to merge 2 commits intoXLSForm:masterfrom
Garen6:eecs/issue-809-submission-url
Open

Issue #809 - Warn or throw an error on an invalid submission_url#841
Garen6 wants to merge 2 commits intoXLSForm:masterfrom
Garen6:eecs/issue-809-submission-url

Conversation

@Garen6
Copy link
Copy Markdown

@Garen6 Garen6 commented Apr 25, 2026

Why is this the best possible solution? Were any other approaches considered?
This fixes the bug at the source: parameters_generic.parse() was intentionally preserving case for value and label, but it was also preserving leading and trailing whitespace for those two keys only. That caused forms like value = VAL , label = lBl to fail later with an invalid-name error when used in select_one_from_file / select_multiple_from_file.

The chosen fix keeps the existing intended behavior, which is:

preserve case for value and label
trim incidental outer whitespace the same way other parameters are normalized
I considered leaving parsing unchanged and adding a later validation special case, but that would keep the bug’s root cause in the generic parser and make downstream handling more brittle. Normalizing the values once in the parser is smaller, clearer, and benefits every caller consistently.

What are the regression risks?
Low. The change is narrowly scoped to case-sensitive parameter values in parameters_generic.parse(). It does not change:

parameter key parsing
separator handling
case normalization for non-case-sensitive parameters
validation rules for supported/unsupported parameter names
The main regression risk would be accidentally changing the intended case-preservation behavior for value and label, so I added a regression test to confirm that case is still preserved while outer whitespace is removed.

Does this change require updates to documentation? If so, please file an issue here and include the link below.
I do not think this requires a docs update. This change aligns pyxform with the intuitive expectation that incidental leading/trailing spaces around parameter values should not break form compilation.

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