mirror of
https://github.com/codexu/note-gen.git
synced 2026-04-25 12:55:57 +03:00
Labels
No labels
bug
duplicate
feature
platform: Android
platform: Linux
platform: Windows
platform: iOS
platform: macOS
priority: high
priority: low
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/note-gen#765
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/codexu/note-gen/pull/669
Author: @steven-jianhao-li
Created: 9/23/2025
Status: ✅ Merged
Merged: 9/26/2025
Merged by: @codexu
Base:
dev← Head:dev📝 Commits (1)
db74ff7fix(#664): 修复目录或文件名包含特殊字符‘&’时,笔记同步功能失效问题📊 Changes
1 file changed (+4 additions, -4 deletions)
View changed files
📝
src/lib/github.ts(+4 -4)📄 Description
issue: #664
之前文件名和路径只是通过将空格替换为下划线来过滤。这不足以处理其他特殊字符(例如
&),这会导致GitHub API请求url出错。这是个简单提交,在
uploadFile、getFiles、deleteFile和getFileCommits函数中使用encodeURIComponent封装了文件名和路径。这确保所有特殊字符都被正确编码,防止API在处理具有非标准名称的文件时失败。Previously, filenames and paths were only sanitized by replacing spaces with underscores. This was insufficient for handling other special characters (e.g.,
&), which could lead to broken GitHub API request URLs.This commit wraps filenames and paths with
encodeURIComponentin theuploadFile,getFiles,deleteFile, andgetFileCommitsfunctions. This ensures all special characters are properly encoded, preventing API failures when handling files with non-standard names.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.