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

Broken links to anchors for non-ASCII symbols on wiki TOC #29877

Closed
crackedmind opened this issue Mar 18, 2024 · 1 comment · Fixed by #29931
Closed

Broken links to anchors for non-ASCII symbols on wiki TOC #29877

crackedmind opened this issue Mar 18, 2024 · 1 comment · Fixed by #29931
Labels
Milestone

Comments

@crackedmind
Copy link

crackedmind commented Mar 18, 2024

Description

Anchors with non-ASCII symbols encodes twice and then isn't working anymore. Disabling javascript helps.

Create wiki page with title

# 气候宜人

It renders as #user-content-%E6%B0%94%E5%80%99%E5%AE%9C%E4%BA%BA but javascript modifies this to #%25E6%25B0%2594%25E5%2580%2599%25E5%25AE%259C%25E4%25BA%25BA

Seems it is regression since #29666 #29305

Gitea Version

1.21.8

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

from command line

Database

SQLite

@crackedmind crackedmind changed the title Incorrect rendering links to anchors for non-ASCII symbols on wiki TOC Incorrect links to anchors for non-ASCII symbols on wiki TOC Mar 18, 2024
@crackedmind crackedmind changed the title Incorrect links to anchors for non-ASCII symbols on wiki TOC Broken links to anchors for non-ASCII symbols on wiki TOC Mar 18, 2024
@silverwind
Copy link
Member

We should add some tests for these link rewrites with the fix.

@lunny lunny added this to the 1.21.9 milestone Mar 18, 2024
lafriks pushed a commit that referenced this issue Mar 20, 2024
Fix #29877

---------

Co-authored-by: silverwind <me@silverwind.io>
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Mar 20, 2024
Fix go-gitea#29877

---------

Co-authored-by: silverwind <me@silverwind.io>
lafriks pushed a commit that referenced this issue Mar 20, 2024
Backport #29931 by @lunny

Fix #29877

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants