Re: [web-nfc] Is the external type validate part correct? (#642)

So we check whether the string is an ascii string, meaning: An ASCII code point is a [code point](https://infra.spec.whatwg.org/#code-point) in the range U+0000 NULL to U+007F DELETE, inclusive.

![image](https://user-images.githubusercontent.com/1101339/175914968-d899e929-b0da-4df1-b59c-c593788901db.png)

Then we return false if it contains the following chars, plus underscore:: A forbidden host code point is U+0000 NULL, U+0009 TAB, U+000A LF, U+000D CR, U+0020 SPACE, U+0023 (#), U+002F (/), U+003A (:), U+003C (<), U+003E (>), U+003F (?), U+0040 (@), U+005B ([), U+005C (\), U+005D (]), U+005E (^), or U+007C (|).

This doesn't seem to be good enough to match the following:

0-9 | A-Z | a-z | "(" | ")" | "+" | "," | "-" | "." |":" | "=" | "@" | ";" | "$" | "_" | "!" | "*" | "'" |  '%" | "/" | "?" | "#"

Even _ seems to be allowed there. And there is a special restriction on % as it has to be followed with two hex values



-- 
GitHub Notification of comment by kenchris
Please view or discuss this issue at https://github.com/w3c/web-nfc/issues/642#issuecomment-1167146007 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 27 June 2022 09:59:08 UTC