Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: wiki page delete issue #7656

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alicse3
Copy link

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
1 participant