forked from friendica/php-json-ld
Use remote doc documentUrl as base.
This commit is contained in:
parent
5eeb29a9d2
commit
d27ad5f210
|
@ -833,7 +833,6 @@ class JsonLdProcessor {
|
|||
*/
|
||||
public function expand($input, $options) {
|
||||
self::setdefaults($options, array(
|
||||
'base' => is_string($input) ? $input : '',
|
||||
'keepFreeFloatingNodes' => false,
|
||||
'documentLoader' => 'jsonld_default_document_loader'));
|
||||
|
||||
|
@ -865,6 +864,9 @@ class JsonLdProcessor {
|
|||
array('remoteDoc' => $remote_doc), $e);
|
||||
}
|
||||
|
||||
// set default base
|
||||
self::setdefault($options, 'base', $remote_doc->documentUrl ?: '');
|
||||
|
||||
// build meta-object and retrieve all @context urls
|
||||
$input = (object)array(
|
||||
'document' => self::copy($remote_doc->document),
|
||||
|
|
Loading…
Reference in a new issue