Skip to content

Dashes in Wiki page titles are replaced with spaces #7570

Closed
@qwertfisch

Description

@qwertfisch

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions