[whatwg/url] "For each byte in buffer: If byte is less than ..." (#379)

https://url.spec.whatwg.org/commit-snapshots/a1b789c6b6c36fcdb16311da5abd177e84151fca/#url-parsing

> For each byte in buffer:​
> 
> If byte is less than 0x21 \(\!\), greater than 0x7E \(\~\), or is 0x22 \("\), 0x23 \(\#\), 0x3C \(<\), or 0x3E \(>\), append byte, percent encoded, to url’s query\.
> 
> Otherwise, append a code point whose value is byte to url’s query\.

This leads to creation of invalid URLs - ones that contain ```[, \, ], ^, `, {, |, }```, which are neither [URL code points](https://url.spec.whatwg.org/#url-code-points) nor '%' and trigger validation errors:

>Otherwise:
>
> If c is not a URL code point and not U+0025 (%), validation error.

I think that either:
* the list of URL code points should be expanded to include more characters - and they should not trigger validation errors, or
* these ones should be escaped too.

Related issue: #378

-- 
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/379

Received on Tuesday, 10 April 2018 21:17:39 UTC