Merge pull request #13417 from Snuffleupagus/xfa-URL-clone

[XFA] Send URLs as strings, rather than objects (issue 1773)
This commit is contained in:
calixteman 2021-05-22 14:31:59 +02:00 committed by GitHub
commit 0df1a56619
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -2257,7 +2257,7 @@ class Image extends StringObject {
};
if (this.href) {
html.attributes.src = new URL(this.href);
html.attributes.src = new URL(this.href).href;
return html;
}

View File

@ -1800,7 +1800,10 @@ class LoopbackPort {
}
return result;
}
result = Array.isArray(value) ? [] : {};
if (value instanceof URL) {
throw new Error(`LoopbackPort.postMessage - cannot clone: ${value}`);
}
result = Array.isArray(value) ? [] : Object.create(null);
cloned.set(value, result); // Adding to cache now for cyclic references.
// Cloning all value and object properties, however ignoring properties
// defined via getter.