Umlauts not allowed in repo topic/misleading error message #3621

Open
opened 2025-11-02 05:19:51 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @dadosch on GitHub (Jul 19, 2019).

  • Gitea version (or commit ref): 1.8.3
  • Git version: not relevant
  • Operating system: Arch Linux
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

When you try to add a topic to a repo with a Umlaut in it (äüö etc.) Gitea doesn't save it, but rather displays an error message that topics have to start with a letter or a number and must be no longer than 35 characters.

Screenshots

Screenshot_20190719_143752

Originally created by @dadosch on GitHub (Jul 19, 2019). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.8.3 - Git version: not relevant - Operating system: Arch Linux - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description When you try to add a topic to a repo with a Umlaut in it (äüö etc.) Gitea doesn't save it, but rather displays an error message that topics have to start with a letter or a number and must be no longer than 35 characters. ## Screenshots ![Screenshot_20190719_143752](https://user-images.githubusercontent.com/12801390/61535528-0a4ded80-aa22-11e9-97a5-28379492488b.png) <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the issue/confirmedtype/enhancement labels 2025-11-02 05:19:51 -06:00
Author
Owner

@mrsdizzie commented on GitHub (Jul 19, 2019):

This is bug of the original EN description since we only allow ASCII A-Za-z which is different than all "letters". I think we could do better for topics though and allow more characters like this example.

I think we could expand the check from ^[a-z0-9][a-z0-9-]*$ to ^[\p{L}0-9][\p{L}0-9-]*$ which is supported in Go.

See https://regex101.com/r/CoHxiW/2

@mrsdizzie commented on GitHub (Jul 19, 2019): This is bug of the original EN description since we only allow ASCII A-Za-z which is different than all "letters". I think we could do better for topics though and allow more characters like this example. I think we could expand the check from ```^[a-z0-9][a-z0-9-]*$``` to ```^[\p{L}0-9][\p{L}0-9-]*$``` which is supported in Go. See https://regex101.com/r/CoHxiW/2
Author
Owner

@mrsdizzie commented on GitHub (Jul 19, 2019):

We also check this in the front end in Javascript which unfortunately doesn't support unicode property escapes until ECMAScript 2018, turning this from a one line fix into something else :( I think we should get rid of that and validate in go and use ctx.Flash.Error like we do other places.

@mrsdizzie commented on GitHub (Jul 19, 2019): We also check this in the front end in Javascript which unfortunately doesn't support unicode property escapes until ECMAScript 2018, turning this from a one line fix into something else :( I think we should get rid of that and validate in go and use ctx.Flash.Error like we do other places.
Author
Owner

@stale[bot] commented on GitHub (Sep 18, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Sep 18, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@OtherSystems commented on GitHub (Jan 24, 2022):

Hi, I run into something similar when trying to import non-english projects (in this care hawaiian). Some of the characters are not allowed.

@OtherSystems commented on GitHub (Jan 24, 2022): Hi, I run into something similar when trying to import non-english projects (in this care hawaiian). Some of the characters are not allowed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3621