w3c / json-ld-api

JSON-LD 1.1 Processing Algorithms and API Specification
https://w3c.github.io/json-ld-api/
Other
73 stars 29 forks source link

Add test for relative IRI starting with a number. #577

Open davidlehn opened 10 months ago

davidlehn commented 10 months ago

jsonld.js had a bug not being strict enough when parsing IRIs. For input like 123:abc it would think 123 was a URI scheme. https://github.com/digitalbazaar/jsonld.js/issues/523

This may not be a common implementation problem. Perhaps a one-line test case update can be added just in case. Which of the many toRdf 3986 test files would be best for this? A one-liner to ensure 123:abc is considered relative vs absolute would catch the issue.