[OGUI-1920] Encode filter query in route updates - #3602
Open
isaachilly wants to merge 8 commits into
Open
Conversation
isaachilly
force-pushed
the
bug/ILG/OGUI-1920/Fix-encoding-order-of-filter-parameter-q
branch
2 times, most recently
from
September 9, 2026 06:59
b6e3ad3 to
59052c7
Compare
isaachilly
marked this pull request as ready for review
September 9, 2026 16:08
Centralised URL encoding for filters. Removed encoding in `LogFilter` so filter values are no longer pre-encoded before serialisation; keeping query generation in one place.
Update InfoLogger filter action tests to match fully encoded `q` parameter.
Adds round-trip tests in a separate mocha file. Removes old encoding tests.
Adds a `queryString` getter on `LogFilter` that uses shared `buildUrl` utilities, and updates `Model` to rely on that property when syncing route state.
This no longer has its corresponding encoder so it's pointless as the URL at this point will contain no `'\n` strings, they will all be percent-encoded.
isaachilly
force-pushed
the
bug/ILG/OGUI-1920/Fix-encoding-order-of-filter-parameter-q
branch
from
September 11, 2026 13:31
59052c7 to
5e08efd
Compare
graduta
approved these changes
Sep 14, 2026
graduta
left a comment
Member
There was a problem hiding this comment.
I approved as my comment is not a blocker or requested change but feel free to take it into consideration
| return await page.evaluate(() => window.model.log.filter.criterias.message.match); | ||
| }; | ||
|
|
||
| it('should preserve consecutive double quotes', async () => { |
Member
There was a problem hiding this comment.
This test and similar below ones, I reckon could also be written as a list of strings to test and use in a loop.
While not generally done so in our codebase, I think in this case it makes sense because you can quickly spot the edge cases you are testing by having all in one place, rather than having to go test by test. What do you think?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have JIRA issue created
Ticket:
The
qURL parameter in ILG, containing the JSON object of active filters, is not being encoded in the correct order creating opportunity for corruption when sharing or decoding.The changes to the code include:
Reviewer can test with a filter value of
C:\tempon a dev instance before and after the branch's changes and note the difference:{and}and the filter value isC:<tab>empas the\twas incorrectly consumed as a JSON escape.C:\temp.Reviewer should note the filter JSON object is now wholly-encoded as oppose to before when it was just its values.
Reviewer should note that changes to an ILG integration test will be required as it asserts against not a fully-encoded query string.
Reviewer should note the address bar decodes double quotation marks for readability but will copy the encoded version.