Skip to content

Commit

Permalink
Expand regex for absolute IRIs
Browse files Browse the repository at this point in the history
  • Loading branch information
balhoff authored and RubenVerborgh committed Aug 10, 2024
1 parent ebde86c commit 9eb98a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sparql.jison
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
if (iri[0] === '<')
iri = iri.substring(1, iri.length - 1);
// Return absolute IRIs unmodified
if (/^[a-z]+:/i.test(iri))
if (/^[a-z][a-z0-9.+-]*:/i.test(iri))
return iri;
if (!Parser.base)
throw new Error('Cannot resolve relative IRI ' + iri + ' because no base IRI was set.');
Expand Down

0 comments on commit 9eb98a5

Please sign in to comment.