Skip to content

Fix URL encoding of visual search condition values - #1420

Open
Gordex2014 wants to merge 1 commit into
mainfrom
bugfix/1415-search-url-encoding
Open

Gordex2014 wants to merge 1 commit into
mainfrom
bugfix/1415-search-url-encoding

Conversation

@Gordex2014

Copy link
Copy Markdown
Contributor

Entering A&A HEALTHCARE LLC in a visual search condition previously generated a literal &, splitting the name into separate query parameters and returning unrelated records. The builder now produces GET /Location?name=A%26A%20HEALTHCARE%20LLC and returns the two matching Locations while excluding the control record.

Encode each FHIR-serialized condition alternative during final URL assembly, before joining structural OR commas. Untouched loaded URLs keep their original spelling; visual edits rebuild correctly encoded values. Update manual testing matrix row 4.20.

Regression coverage checks actual requests and results on Queries and Resources, Copy/Saved/Recent, reload and deep links, reserved characters, typed values, escaped commas and OR alternatives, chains, and _has. Validation passed with 128 browser tests, 60 unit tests, 3 focused Rust tests, and a UI build. The regression fails against the original implementation. Manual QA confirms both routes retain the literal value and return the intended records. Two independent reviews found no actionable issues.

Closes #1415.

Before and after

The same visual condition now keeps the full name as one value. The query and narration are corrected, and the result count falls from three to two.

Before After
Literal ampersand splits the Location name and returns three results Encoded ampersand preserves the complete Location name and returns two results

Temporary review evidence expires on 2026-10-21: before at 2026-10-21T17:24:55.225Z, after at 2026-10-21T17:24:55.938Z.

@codecov

codecov Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

Search visual builder emits literal ampersands from condition values

1 participant