Re: [whatwg/url] URL serialiser does not produce idempotent strings if an opaque path has a trailing space and "exclude fragment" is true (Issue #784)

To illustrate using JSDOM:

```javascript
const urlRecord = parseURL("data:space #hello");
const serialized = serializeURL(urlRecord, /* excludeFragment: */ true);
  
const reparsed = parseURL(serialized);
const serializedAgain = serializeURL(reparsed, /* excludeFragment: */ true);
assert.strictEqual(serialized, serializedAgain);  // Fails
```

```
assert.strictEqual(received, expected)

Expected value to strictly be equal to:
  "data:space"
Received:
  "data:space "
```

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

Message ID: <whatwg/url/issues/784/1707005644@github.com>

Received on Tuesday, 5 September 2023 17:16:20 UTC