From 8bac3dac4509f9f5456eae7e20f160ac20462236 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Mon, 17 Oct 2022 09:34:27 +0800 Subject: [PATCH 1/2] =?UTF-8?q?:bug:=20=E4=BD=BF=E7=94=A8=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=20`data-export-html`=20=E5=AF=BC=E5=87=BA=E6=97=B6=20?= =?UTF-8?q?``=20=E6=A0=87=E7=AD=BE=E4=B8=A2=E5=A4=B1=20Fix?= =?UTF-8?q?=20https://github.com/siyuan-note/siyuan/issues/6228?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/export.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/model/export.go b/kernel/model/export.go index c8e789155..a56a768fb 100644 --- a/kernel/model/export.go +++ b/kernel/model/export.go @@ -448,6 +448,9 @@ func ExportHTML(id, savePath string, pdf, keepFold bool) (name, dom string) { luteEngine.SetFootnotes(true) luteEngine.RenderOptions.ProtyleContenteditable = false luteEngine.SetProtyleMarkNetImg(false) + // 不进行安全过滤,因为导出时需要保留所有的 HTML 标签 + // 使用属性 `data-export-html` 导出时 `` 标签丢失 https://github.com/siyuan-note/siyuan/issues/6228 + luteEngine.SetSanitize(false) renderer := render.NewProtyleExportRenderer(tree, luteEngine.RenderOptions) dom = gulu.Str.FromBytes(renderer.Render()) return From 6b972a0f5a82f2f7ce8181651ada2a3ce4baaf2a Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Mon, 17 Oct 2022 09:40:09 +0800 Subject: [PATCH 2/2] :camera_flash: Update snapshots --- README.md | 4 +--- README_zh_CN.md | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bd85f4d03..9909d5689 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,7 @@ Build Your Eternal Digital Garden SiYuan is a local-first personal knowledge management system, support fine-grained block-level reference and Markdown WYSIWYG. -![feature0.png](https://b3logfile.com/file/2022/05/feature0-a82bdd3f.png) - -![feature1-1.png](https://b3logfile.com/file/2022/05/feature1-1-740d9a02.png) +![feature0.png](https://b3logfile.com/file/2022/10/feature0-9kIbkZ4.png) ## 🔮 Features diff --git a/README_zh_CN.md b/README_zh_CN.md index 56ad1b128..11f1e9e4f 100644 --- a/README_zh_CN.md +++ b/README_zh_CN.md @@ -17,9 +17,7 @@ 思源笔记是一款本地优先的个人知识管理系统, 支持细粒度块级引用和 Markdown 所见即所得。 -![feature0.png](https://b3logfile.com/file/2022/05/feature0-a82bdd3f.png) - -![feature1-1.png](https://b3logfile.com/file/2022/05/feature1-1-740d9a02.png) +![feature0.png](https://b3logfile.com/file/2022/10/feature0-9kIbkZ4.png) 欢迎到[思源笔记官方讨论区](https://ld246.com/domain/siyuan)了解更多。同时也欢迎关注 B3log 开源社区微信公众号 `B3log开源`: