Skip to content
This repository was archived by the owner on Feb 17, 2026. It is now read-only.

Prefixed IRIs with an escaped character in the local name get parsed incorrectly #168

@dionenak

Description

@dionenak

Hello,

Currently when a prefixed IRI has an escaped non-alphanumeric character, the IRI gets parsed incorrectly.

For example, this query:

PREFIX a: <a:a>
Select * where {
  bind(a:a\/s as ?x)
}

Results to this JSON with the value of the IRI being a:aa\\/s:

{
  "queryType": "SELECT",
  "variables": [
    {}
  ],
  "where": [
    {
      "type": "bind",
      "variable": {
        "termType": "Variable",
        "value": "x"
      },
      "expression": {
        "termType": "NamedNode",
        "value": "a:aa\\/s"
      }
    }
  ],
  "type": "query",
  "prefixes": {
    "a": "a:a"
  }
}

But the value of the IRI should be a:aa/s:

{
  "queryType": "SELECT",
  "variables": [
    {}
  ],
  "where": [
    {
      "type": "bind",
      "variable": {
        "termType": "Variable",
        "value": "x"
      },
      "expression": {
        "termType": "NamedNode",
        "value": "a:aa/s"
      }
    }
  ],
  "type": "query",
  "prefixes": {
    "a": "a:a"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions