Bad url due to question mark in Wiki page title #11419

Closed
opened 2025-11-02 09:37:08 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @arnaujunquera on GitHub (Aug 8, 2023).

Description

I created a Wiki page and named it "How does it work?". When I try to edit it, it redirects me to the "pages" page instead of the editing page. I've found out this issue is caused by the question mark, as it is not encoded property (as can be seen in the screenshot).

To avoid this bug, I simply replace the question mark by "%3F".

Screenshots

image

Gitea Version

1.20.1

Can you reproduce the bug on the Gitea demo site?

Yes

Operating System

Windows

Browser Version

Chrome 115.0.5790.170

Originally created by @arnaujunquera on GitHub (Aug 8, 2023). ### Description I created a Wiki page and named it "How does it work?". When I try to edit it, it redirects me to the "pages" page instead of the editing page. I've found out this issue is caused by the question mark, as it is not encoded property (as can be seen in the screenshot). To avoid this bug, I simply replace the question mark by "%3F". ### Screenshots ![image](https://github.com/go-gitea/gitea/assets/48368943/0bdf7c58-470b-45f1-a08a-4ffb8cffa795) ### Gitea Version 1.20.1 ### Can you reproduce the bug on the Gitea demo site? Yes ### Operating System Windows ### Browser Version Chrome 115.0.5790.170
GiteaMirror added the topic/uitype/bug labels 2025-11-02 09:37:08 -06:00
Author
Owner

@CaiCandong commented on GitHub (Aug 8, 2023):

Here's an easy way to fix the bug:

dcd3a63128/routers/web/repo/wiki.go (L194)

ctx.Data["PageURL"] = template.URL(wiki_service.WebPathToURLPath(pageName))

@CaiCandong commented on GitHub (Aug 8, 2023): Here's an easy way to fix the bug: https://github.com/go-gitea/gitea/blob/dcd3a631288686a95cedbd4aa9cce245e896825d/routers/web/repo/wiki.go#L194 ```ctx.Data["PageURL"] = template.URL(wiki_service.WebPathToURLPath(pageName))```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11419