Re: [whatwg/url] It's not immediately clear that "URL syntax" and "URL parser" conflict (#118)

The model of being stricter in what is allowed than what parses into *something* (or is processed in some defined way) is used widely in HTML, and this section discusses the whys:

https://html.spec.whatwg.org/#conformance-requirements-for-authors

Some of the syntax ones seem like they could apply to URLs as well:

* Unintuitive error-handling behavior
* Errors involving known interoperability problems in legacy user agents
* Errors that risk exposing authors to security attacks
* Cases where the author's intent is unclear
* Cases that are likely to be typos
* Errors that could interfere with new syntax in the future (maybe unlikely for URLs?)

Conformance checking URLs to catch these classes of mistakes seems worthwhile to me. Making the parser return failure for all of these cases would not be web compatible and so a web browser would not be able to do that.

However there is another bullet in HTML's list that currently doesn't apply to URLs, but could in theory:

* Errors with optional error recovery

The URL standard *could* allow a failure to be returned for any syntax violation.

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

Received on Tuesday, 31 January 2017 07:08:52 UTC