- From: Anne van Kesteren <notifications@github.com>
- Date: Wed, 07 Oct 2026 00:06:26 -0700
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/url/pull/932@github.com>
The search setter parsed its input into the list of the query object, but the basic URL parser removes ASCII tab or newline from that input before it sets the query. The list and the query could therefore disagree: after `url.search = "a=\tb"` the query was `a=b`, but `[...url.searchParams]` was `[["a", "\tb"]]`, and the next searchParams mutation would put the tab back into the query as `%09`.
Parse the resulting query instead, as the href setter and URL object initialization already do. This matches Gecko, WebKit, and Node.js.
Tests: https://github.com/web-platform-tests/wpt/pull/63344
Fixes #931.
<!--
This comment and the below content is programmatically generated.
You may add a comma-separated list of anchors you'd like a
direct link to below (e.g. #idl-serializers, #idl-sequence):
Don't remove this comment or modify anything below this line.
If you don't want a preview generated for this pull request,
just replace the whole of this comment's content by "no preview"
and remove what's below.
-->
***
<a href="https://whatpr.org/url/932.html" title="Last updated on Oct 7, 2026, 7:06 AM UTC (ccc2080)">Preview</a> | <a href="https://whatpr.org/url/932/dcd3d6b...ccc2080.html" title="Last updated on Oct 7, 2026, 7:06 AM UTC (ccc2080)">Diff</a>
You can view, comment on, or merge this pull request online at:
https://github.com/whatwg/url/pull/932
-- Commit Summary --
* Make the search setter keep searchParams in sync with the query
-- File Changes --
M url.bs (2)
-- Patch Links --
https://github.com/whatwg/url/pull/932.patch
https://github.com/whatwg/url/pull/932.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/pull/932
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/url/pull/932@github.com>
Received on Wednesday, 7 October 2026 07:06:30 UTC