Description
- Gitea version (or commit ref): 1.9.0+
- Git version: 2.22
- Operating system: Linux
- Database:
- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes: https://try.gitea.io/qwertfisch/TestRepo/wiki/Page-with-dash-here
- No
- Not relevant
Description
The Gitea internal wiki does not allow dash characters in page titles. I can enter it on creation, but it is replaced with a space on display.
I know that the direct cause is that spaces are replaced with dashes on filename level (also in the URL), so there is no distinction between spaces and dashes when reopening a page. Hence it will all be escaped and displayed as a space character.
Attempted workaround with URL-escaped character
All non-ASCII Unicode characters are displayed as URL-escaped variants of their Unicode code point, and even /
is replaced with %2F
. So I would expect that a filename containing %2D
(stands for the dash) could be loaded and displayed with its correct title. I had manually created such a file, pushed it, but the %2D-escaped dash is still further escaped to a space. Even worse: the URL with the page won’t load anymore.
This looks like a deeper error in escape handling with the dash character.