Skip to content

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

:bug: Fix https://github.com/siyuan-note/siyuan/issues/7414#issuecomment-1704573557

Danield59651639bcc
diff --git a/kernel/model/export.go b/kernel/model/export.go
index 1eca4c1ad8..f96b3b187b 100644
--- a/kernel/model/export.go
+++ b/kernel/model/export.go
@@ -896,6 +896,7 @@ func processPDFLinkEmbedAssets(pdfCtx *pdfcpu.Context, assetDests []string, remo
now := pdfcpu.StringLiteral(pdfcpu.DateString(time.Now()))
for _, link := range assetLinks {
link.URI = strings.ReplaceAll(link.URI, "http://"+util.LocalHost+":"+util.ServerPort+"/export/temp/", "")
+ link.URI = strings.ReplaceAll(link.URI, "http://"+util.LocalHost+":"+util.ServerPort+"/", "") // https://github.com/siyuan-note/siyuan/issues/7414#issuecomment-1704573557
link.URI, _ = url.PathUnescape(link.URI)
if idx := strings.Index(link.URI, "?"); 0 < idx {
link.URI = link.URI[:idx]