[whatwg/url] Ambiguity with the 1st clause of the "no scheme state" in basic parser. (Issue #867)

dannyniu created an issue (whatwg/url#867)

### What is the issue with the URL Standard?

The clause says: 

> If base is null, or base has an [opaque path](https://url.spec.whatwg.org/#url-opaque-path) and [c](https://url.spec.whatwg.org/#c) is not U+0023 (#), [missing-scheme-non-relative-URL](https://url.spec.whatwg.org/#missing-scheme-non-relative-url) [validation error](https://url.spec.whatwg.org/#validation-error), return failure.

There's an ambiguity as to whether the condition is interpreted as:

- `base === null || (path_is_opaque(base) && c != "#")` or
- `(base === null || path_is_opaque(base)) && c != "#"`

Since these 2 conditions have different outcome on some input, it is necessary this be clarified.

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

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

Received on Friday, 21 March 2025 09:52:09 UTC