Skip to content

fix: wiki page delete issue#7656

Closed
alicse3 wants to merge 1 commit intogogs:mainfrom
alicse3:fix-delete-wiki-issue
Closed

fix: wiki page delete issue#7656
alicse3 wants to merge 1 commit intogogs:mainfrom
alicse3:fix-delete-wiki-issue

Conversation

@alicse3
Copy link
Contributor

@alicse3 alicse3 commented Jan 30, 2024

Fixes #7596 when PR #103 is merged.

Describe the pull request

It seems there's an issue with the handling of special characters in wiki names, where Git internally escapes them. This creates a mismatch between the escaped filenames and the actual filenames, making it challenging to delete files accurately. As a result, the deletion process is not functioning as expected.

Including the -z option in the git ls-tree command results in filenames being presented without quotes.
Another pull request has been initiated to handle this specific case. Please check git-module PR #103 for details.

For example, I have created below test wikis:
Test Wikis
See the differences of using -z:
Test Wikis with z
Using -z the filename is output verbatim.

Link to the issue: #7596

Checklist

  • I agree to follow the Code of Conduct by submitting this pull request.
  • I have read and acknowledge the Contributing guide.
  • I have added test cases to cover the new code or have provided the test plan.

Test plan

Make sure gogs/git-module has PR #103 changes. And gogs/gogs has this PR changes.

Build(go build -o gogs) and start the gogs web server(./gogs web).
Create wiki pages(with characters like ", \ etc,.) and test the fix.

Delete.Wiki.Pages.mov

@alicse3 alicse3 requested a review from unknwon as a code owner January 30, 2024 18:03
@alicse3 alicse3 closed this by deleting the head repository Aug 17, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 18, 2025
@unknwon unknwon added this to the 0.14.0 milestone Jan 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot delete wiki page which title containing double quote symbol

2 participants