Phone number will lost last number #3207

Closed
opened 2025-11-02 05:03:52 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @FalconWu2017 on GitHub (Apr 18, 2019).

  • Gitea version (or commit ref):1.7.6
  • Git version:
  • Operating system:win 2012
  • Database (use [x]):
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

The phone number will lost last number in issues,such as I want 12475554522 but actually shows is 1247555452
This is edit number:
image
This is sure number after save.
image
The last number lost.

Originally created by @FalconWu2017 on GitHub (Apr 18, 2019). - Gitea version (or commit ref):1.7.6 - Git version: - Operating system:win 2012 - Database (use `[x]`): - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [ ] Not relevant - Log gist: ## Description The phone number will lost last number in issues,such as I want `12475554522` but actually shows is `1247555452` This is edit number: ![image](https://user-images.githubusercontent.com/34147999/56338907-9dd31080-61de-11e9-8990-be05d0e45f8e.png) This is sure number after save. ![image](https://user-images.githubusercontent.com/34147999/56338979-eab6e700-61de-11e9-8262-c31199443a27.png) The last number lost.
GiteaMirror added the issue/confirmedtype/bug labels 2025-11-02 05:03:52 -06:00
Author
Owner

@mrsdizzie commented on GitHub (Apr 18, 2019):

This is because Gitea (and Github) look for a string of numbers (and/optional letters a-f) that are 7-40 char in length and see it as a SHA has value and link it using a truncated version of the value. You pretty much can't use any text that would also be part of a valid SHA, unfortunately.

Github is less error prone for a case like this because it actually does a lookup to see if the SHA exists (Gitea just matches the pattern and creates a link to avoid the lookup).

@mrsdizzie commented on GitHub (Apr 18, 2019): This is because Gitea (and Github) look for a string of numbers (and/optional letters a-f) that are 7-40 char in length and see it as a SHA has value and link it using a truncated version of the value. You pretty much can't use any text that would also be part of a valid SHA, unfortunately. Github is less error prone for a case like this because it actually does a lookup to see if the SHA exists (Gitea just matches the pattern and creates a link to avoid the lookup).
Author
Owner

@FalconWu2017 commented on GitHub (Apr 18, 2019):

There is a temporary solution add the ` on both sides of the number then it will not as a SHA value.

@FalconWu2017 commented on GitHub (Apr 18, 2019): There is a temporary solution add the ` on both sides of the number then it will not as a SHA value.
Author
Owner

@stale[bot] commented on GitHub (Jun 17, 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 (Jun 17, 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

@lunny commented on GitHub (Jan 6, 2021):

I think this has been resolved.

@lunny commented on GitHub (Jan 6, 2021): I think this has been resolved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3207