소스 검색

:bug: 导出 PDF、HTML 和 Word 时未移除不支持的文件名符号 https://github.com/siyuan-note/siyuan/issues/5614

Liang Ding 2 년 전
부모
커밋
2db8b655df
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      kernel/model/export.go

+ 2 - 0
kernel/model/export.go

@@ -204,6 +204,7 @@ func ExportMarkdownHTML(id, savePath string, docx bool) (name, dom string) {
 
 	tree = exportTree(tree, true)
 	name = path.Base(tree.HPath)
+	name = util.FilterFileName(name) // 导出 PDF、HTML 和 Word 时未移除不支持的文件名符号 https://github.com/siyuan-note/siyuan/issues/5614
 
 	if err := os.MkdirAll(savePath, 0755); nil != err {
 		logging.LogErrorf("mkdir [%s] failed: %s", savePath, err)
@@ -308,6 +309,7 @@ func ExportHTML(id, savePath string, pdf bool) (name, dom string) {
 
 	tree = exportTree(tree, true)
 	name = path.Base(tree.Path)
+	name = util.FilterFileName(name) // 导出 PDF、HTML 和 Word 时未移除不支持的文件名符号 https://github.com/siyuan-note/siyuan/issues/5614
 
 	if err := os.MkdirAll(savePath, 0755); nil != err {
 		logging.LogErrorf("mkdir [%s] failed: %s", savePath, err)