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

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

Originally created by @crackedmind on GitHub (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

Originally created by @crackedmind on GitHub (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
GiteaMirror added the type/bug label 2025-11-02 10:17:38 -06:00
Author
Owner

@silverwind commented on GitHub (Mar 18, 2024):

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

@silverwind commented on GitHub (Mar 18, 2024): We should add some tests for these link rewrites with the fix.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12665