Apostrophe shows as HTML entity when adding user to organization #7995

Closed
opened 2025-11-02 07:45:18 -06:00 by GiteaMirror · 9 comments
Owner

Originally created by @jhult on GitHub (Oct 19, 2021).

Gitea Version

1.15.3

Git Version

2.30.2

Operating System

alpine

How are you running Gitea?

Docker via gitea/gitea:latest-rootless

Database

SQLite

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Description

Create a user with an apostrophe in their name. Add them to an organization. Notice that the apostrophe is shown as the HTML entity (').

Cannot test on try.gitea.io since I need permissions (which I don't have) to add the user to an organization.

User is coming from an OpenID registry.

Screenshots

No response

Originally created by @jhult on GitHub (Oct 19, 2021). ### Gitea Version 1.15.3 ### Git Version 2.30.2 ### Operating System alpine ### How are you running Gitea? Docker via `gitea/gitea:latest-rootless` ### Database SQLite ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Description Create a user with an apostrophe in their name. Add them to an organization. Notice that the apostrophe is shown as the HTML entity (`'`). Cannot test on try.gitea.io since I need permissions (which I don't have) to add the user to an organization. User is coming from an OpenID registry. ### Screenshots _No response_
GiteaMirror added the issue/confirmedtype/bug labels 2025-11-02 07:45:18 -06:00
Author
Owner

@jhult commented on GitHub (Oct 19, 2021):

Related issue: #2122

@jhult commented on GitHub (Oct 19, 2021): Related issue: #2122
Author
Owner

@zeripath commented on GitHub (Oct 19, 2021):

Able to duplicate at least partially on try.gitea.io https://try.gitea.io/org/testOrf/teams/testorf-test-team:

Screenshot from 2021-10-19 22-26-36

Screenshot from 2021-10-19 22-27-10

Screenshot from 2021-10-19 22-27-33

@zeripath commented on GitHub (Oct 19, 2021): Able to duplicate at least partially on try.gitea.io https://try.gitea.io/org/testOrf/teams/testorf-test-team: ![Screenshot from 2021-10-19 22-26-36](https://user-images.githubusercontent.com/1824502/137993097-66d1332e-1891-4292-8b18-74ac16643ce1.png) ![Screenshot from 2021-10-19 22-27-10](https://user-images.githubusercontent.com/1824502/137993153-312ae1f4-4b0d-4bce-951e-dea6042e0bab.png) ![Screenshot from 2021-10-19 22-27-33](https://user-images.githubusercontent.com/1824502/137993208-d4f89360-5bd3-4bf9-8e19-2ff51fac81af.png)
Author
Owner

@jhult commented on GitHub (Oct 19, 2021):

Thanks @zeripath for confirming.

@jhult commented on GitHub (Oct 19, 2021): Thanks @zeripath for confirming.
Author
Owner

@zeripath commented on GitHub (Oct 19, 2021):

@jhult are the two places I've demonstrated the only places where it happens? I.e. it's just in the drop-downs?

@zeripath commented on GitHub (Oct 19, 2021): @jhult are the two places I've demonstrated the only places where it happens? I.e. it's just in the drop-downs?
Author
Owner

@jhult commented on GitHub (Oct 20, 2021):

@zeripath, yes the issue appears to only occur in drop-downs.

@jhult commented on GitHub (Oct 20, 2021): @zeripath, yes the issue appears to only occur in drop-downs.
Author
Owner

@zeripath commented on GitHub (Oct 20, 2021):

Hmm... the problem is:

35b918f574/modules/convert/user.go (L52)

This makes the strange assumption that'd we'd want users Full Names to be renderable...

@zeripath commented on GitHub (Oct 20, 2021): Hmm... the problem is: https://github.com/go-gitea/gitea/blob/35b918f574464eeca89fcf0d5f3a07a58a4b5a38/modules/convert/user.go#L52 This makes the strange assumption that'd we'd want users Full Names to be renderable...
Author
Owner

@zeripath commented on GitHub (Oct 20, 2021):

I'm not sure that we actually allow this.

@zeripath commented on GitHub (Oct 20, 2021): I'm not sure that we actually allow this.
Author
Owner

@wxiaoguang commented on GitHub (Oct 23, 2021):

Can this issue be closed? The PR is merged.

@wxiaoguang commented on GitHub (Oct 23, 2021): Can this issue be closed? The PR is merged.
Author
Owner

@zeripath commented on GitHub (Oct 24, 2021):

I don't think we can backport the fixing PR as it's technically breaking. Therefore I'm removing this from 1.15.6 milestone and moving it to 1.16

@zeripath commented on GitHub (Oct 24, 2021): I don't think we can backport the fixing PR as it's technically breaking. Therefore I'm removing this from 1.15.6 milestone and moving it to 1.16
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7995