digitalbazaar / jsonld.js

A JSON-LD Processor and API implementation in JavaScript
https://json-ld.org/
Other
1.64k stars 195 forks source link

fix: incorrect @id expansion #527

Closed ndr-brt closed 10 months ago

ndr-brt commented 11 months ago

What

This PR provides a way to avoid @id modification in case it contains : and it's not really an URI. I'm not too familiar with the codebase so I just added a test case and a quick fix, but I'm more than available to adjust it based on feedback.

Why

We're trying to expand json documents that have @ids that contain : but they aren't really URIs. The behavior has been described in #523.

Closes: #523

ndr-brt commented 11 months ago

@davidlehn sorry for tagging you here, but there's a possibility to get the PR reviewed? I cannot add reviewers by myself.

davidlehn commented 10 months ago

Thanks. Addressed a bit different in https://github.com/digitalbazaar/jsonld.js/pull/533.