Closed ljos closed 7 years ago
Cool, thanks. Unfortunately I was just wrapping up my own fix for this :)
https://github.com/drobilla/serd/commit/195e4bcff3c4dfd3fe8bbf0df57d53ce89ca99e8 fixes this issue and more strictly follows the URI grammar, supporting the other valid non-alpha characters in non-leading position. The new tests should cover all the cases, let me know if you encounter any more issues.
That is a much nicer fix. I was wondering if I should factor out the check, but decided to try to change as little as possible for a first PR.
Thanks!
Minimal changes are always good, I just looked at the spec and down the rabbit hole I went :)
The prefix or scheme in a URI/IRI can contain a number after the first character. In the scheme we check that the first character is a letter, then we check that all characters in the scheme are alphanumerical.
Fixes #1.