fix: Correctly replace urls with signed versions when display=link
This commit is contained in:
@@ -213,11 +213,16 @@ export class ProsemirrorHelper {
|
|||||||
// Noop: Invalid url.
|
// Noop: Invalid url.
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
for (const originalUrl of Object.keys(mapping)) {
|
||||||
mapping[href] ||
|
if (
|
||||||
(relativeHref ? mapping[relativeHref] : undefined) ||
|
href.startsWith(originalUrl) ||
|
||||||
href
|
relativeHref?.startsWith(originalUrl)
|
||||||
);
|
) {
|
||||||
|
return mapping[originalUrl];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return href;
|
||||||
}
|
}
|
||||||
|
|
||||||
function replaceAttachmentUrls(node: ProsemirrorData) {
|
function replaceAttachmentUrls(node: ProsemirrorData) {
|
||||||
|
|||||||
Reference in New Issue
Block a user