Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/17368

Vanessae53ac856b94a
diff --git a/app/src/protyle/render/av/asset.ts b/app/src/protyle/render/av/asset.ts
index 9469c54a3e..3a92b8f730 100644
--- a/app/src/protyle/render/av/asset.ts
+++ b/app/src/protyle/render/av/asset.ts
@@ -203,8 +203,8 @@ export const editAssetItem = (options: {
const type = options.type as "image" | "file";
const menu = new Menu(Constants.MENU_AV_ASSET_EDIT, async () => {
let currentLink = textElements[0].value;
- if ((!textElements[1] && currentLink === linkAddress) ||
- (textElements[1] && currentLink === linkAddress && textElements[1].value === options.name)) {
+ if ((!textElements[1] && currentLink === decodeURI(linkAddress)) ||
+ (textElements[1] && currentLink === decodeURI(linkAddress) && textElements[1].value === options.name)) {
return;
}
if (type === "image" && currentLink.startsWith("data:image/")) {
diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts
index d3a4afd909..083b0b4bde 100644
--- a/app/src/protyle/render/av/cell.ts
+++ b/app/src/protyle/render/av/cell.ts
@@ -132,7 +132,7 @@ export const genCellValueByElement = (colType: TAVCol, cellElement: HTMLElement)
const isImg = item.classList.contains("av__cellassetimg");
mAsset.push({
type: isImg ? "image" : "file",
- content: isImg ? removeCompressURL(item.getAttribute("src")) : item.getAttribute("data-url"),
+ content: isImg ? removeCompressURL(decodeURI(item.getAttribute("src"))) : item.getAttribute("data-url"),
name: isImg ? "" : item.getAttribute("data-name")
});
});