mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
chore(server): fix clipper
This commit is contained in:
parent
848dc51a7a
commit
4c6a742af7
@ -35,7 +35,7 @@ describe("processContent", () => {
|
||||
[{"imageId":"OKZxZA3MonZJkwFcEhId","src":"inline.png","dataUrl":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAQCAYAAADESFVDAAAAF0lEQVQoU2P8DwQMBADjqKLRIGAgKggAzHs/0SoYCGwAAAAASUVORK5CYII="}],
|
||||
note, `<img src="OKZxZA3MonZJkwFcEhId">`
|
||||
);
|
||||
expect(processed).toStrictEqual(`<img src="api/attachments/foo/image/encodedTitle">`);
|
||||
expect(processed).toStrictEqual(`<img src="api/attachments/foo/image/encodedTitle" >`);
|
||||
});
|
||||
|
||||
it("skips over non-data images", () => {
|
||||
@ -44,7 +44,7 @@ describe("processContent", () => {
|
||||
[{"imageId":"OKZxZA3MonZJkwFcEhId","src":"inline.png","dataUrl": url}],
|
||||
note, `<img src="OKZxZA3MonZJkwFcEhId">`
|
||||
);
|
||||
expect(processed).toStrictEqual(`<img src="OKZxZA3MonZJkwFcEhId">`);
|
||||
expect(processed).toStrictEqual(`<img src="OKZxZA3MonZJkwFcEhId" >`);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -183,7 +183,7 @@ export function processContent(images: Image[], note: BNote, content: string) {
|
||||
const dom = parse(rewrittenContent);
|
||||
|
||||
// Get the content inside the body tag and serialize it
|
||||
rewrittenContent = dom.querySelector("body")?.innerHTML ?? "";
|
||||
rewrittenContent = dom.innerHTML ?? "";
|
||||
|
||||
return rewrittenContent;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user