Re: [whatwg/url] `search` setter keeps tab and newline in the list but drops them from the query (Issue #931)

spokodev left a comment (whatwg/url#931)

I checked. For U+0000 to U+007F plus U+0080, U+00A0, U+00AD, U+00E9, U+2028, U+2029, U+FEFF, U+FFFD and U+1F600, each at the start, in the middle and at the end of `a=b` (411 inputs), I compared `[...url.searchParams]` after `url.search = input`, both untouched and with `url.searchParams` read first, in Chrome 154, Chromium 153, Firefox 155, WebKit 26.6, Node.js 26 and whatwg-url 17.2.0.

Tab, LF and CR are the only inputs where the list differs, between implementations or between the two cases in Chromium. `a b` gives `[["a b", ""]]` everywhere; the query becomes `a%20b`, which decodes back to the same list. Those three are the code points the URL parser removes outright, and they are the only inputs I tried where parsing `url.search` back gives a different list from parsing the raw input.

In Chromium, the read-first case matches parsing the raw input on all 411 inputs, and the untouched case matches Firefox, WebKit and Node.js on all 411.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/931#issuecomment-6022162485
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/url/issues/931/6022162485@github.com>

Received on Tuesday, 6 October 2026 17:52:28 UTC