URI() function accepts invalid IRIs

Hello, I am using the URI function to construct some triples to insert in the DB with a SPARUL query like the following

insert { ?s ex:p ?o }
  ?s_old ex:p ?o .
  bind (uri('http://example.com/s') as ?s)

due to a software bug, the bind statement was filled with strings like

bind (uri('http://example.com/s>>') as ?s)

When I try to consume the data with Jena (both with SPARQL or NQ-exports) I get runtime exceptions from syntax errors like: Illegal unicode excape sequence value: \> (0x3E)

Question: is this the expected behavior for the URI function or should the above query fail?
(or is it maybe a Jena parsing bug?)

Something definitely seems off. It looks like 'http://example.com/s>>' is getting converted to http://example.com/s\>\>

Interestingly it’s only (as far as I can tell) the ‘>’ character that is escaped. http://example.com/s< stays the same as well as 'http://$*$@!%@#!%@$!#'

‘strange’ is interpreted as a relative IRI and returns ‘tag:stardog:api:strange’ but'$*$@!%@#!%@$!#' is not changed or converted to a relative url but comes back as '$*$@!%@#!%@$!#''

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.