mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-02 16:35:19 +02:00
feat(ui): add links to assigners in issue comments (#8264)
When a user is assigning an issue or PR to another user, an entry is posted in the issue comment list. This PR adds a link to the one assigning the issue. Additionally, tests for preventing XSS vulnerabilities in label rendering were added. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8264 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
commit
8ac572682b
7 changed files with 110 additions and 33 deletions
|
@ -223,15 +223,13 @@ func TestIssueCommentChangeAssignee(t *testing.T) {
|
|||
testIssueCommentChangeEvent(t, htmlDoc, "2041",
|
||||
"octicon-person", "User One", "/user1",
|
||||
[]string{"user1 was unassigned by user2"},
|
||||
[]string{"/user1"})
|
||||
// []string{"/user1", "/user2"})
|
||||
[]string{"/user1", "/user2"})
|
||||
|
||||
// Add other
|
||||
testIssueCommentChangeEvent(t, htmlDoc, "2042",
|
||||
"octicon-person", "< U<se>r Tw<o > ><", "/user2",
|
||||
[]string{"user2 was assigned by user1"},
|
||||
[]string{"/user2"})
|
||||
// []string{"/user2", "/user1"})
|
||||
[]string{"/user2", "/user1"})
|
||||
|
||||
// Self-remove
|
||||
testIssueCommentChangeEvent(t, htmlDoc, "2043",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue