gitea/models/issues
KN4CK3R 022552d5b6
Rework markup link rendering (#26745) (#28803)
Backport #26745
Fixes #26548

This PR refactors the rendering of markup links. The old code uses
`strings.Replace` to change some urls while the new code uses more
context to decide which link should be generated.

The added tests should ensure the same output for the old and new
behaviour (besides the bug).

We may need to refactor the rendering a bit more to make it clear how
the different helper methods render the input string. There are lots of
options (resolve links / images / mentions / git hashes / emojis / ...)
but you don't really know what helper uses which options. For example,
we currently support images in the user description which should not be
allowed I think:

<details>
  <summary>Profile</summary>

https://try.gitea.io/KN4CK3R


![grafik](https://github.com/go-gitea/gitea/assets/1666336/109ae422-496d-4200-b52e-b3a528f553e5)

</details>
2024-01-16 02:13:29 +00:00
..
assignees_test.go
assignees.go
comment_code.go Rework markup link rendering (#26745) (#28803) 2024-01-16 02:13:29 +00:00
comment_list.go Add logs for data broken of comment review (#27326) (#27345) 2023-09-29 13:31:13 +08:00
comment_test.go More db.DefaultContext refactor (#27265) (#27347) 2023-09-29 13:35:01 +00:00
comment.go Upgrade xorm to new version which supported update join for all supported databases (#28590) (#28668) 2023-12-31 13:57:36 +08:00
content_history_test.go Fix comment permissions (#28213) (#28216) 2023-11-25 23:43:23 +00:00
content_history.go Fix comment permissions (#28213) (#28216) 2023-11-25 23:43:23 +00:00
dependency_test.go
dependency.go
issue_index.go Another round of db.DefaultContext refactor (#27103) (#27262) 2023-09-25 19:24:35 +02:00
issue_label_test.go Don't let API add 2 exclusive labels from same scope (#27433) (#27460) 2023-10-06 05:06:31 +08:00
issue_label.go Don't let API add 2 exclusive labels from same scope (#27433) (#27460) 2023-10-06 05:06:31 +08:00
issue_list_test.go
issue_list.go
issue_lock.go
issue_project.go
issue_search.go Fix review request number and add more tests (#27104) (#27168) 2023-09-21 17:01:37 +00:00
issue_stats.go Another round of db.DefaultContext refactor (#27103) (#27262) 2023-09-25 19:24:35 +02:00
issue_test.go More db.DefaultContext refactor (#27265) (#27347) 2023-09-29 13:35:01 +00:00
issue_update.go Don't use subselect in DeleteIssuesByRepoID (#27332) (#27408) 2023-10-03 17:59:45 +08:00
issue_user_test.go
issue_user.go Add index to issue_user.issue_id (#27154) (#27158) 2023-09-21 11:42:34 +08:00
issue_watch_test.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
issue_watch.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
issue_xref_test.go
issue_xref.go More db.DefaultContext refactor (#27265) (#27347) 2023-09-29 13:35:01 +00:00
issue.go
label_test.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
label.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
main_test.go
milestone_list.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
milestone_test.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
milestone.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
pull_list.go
pull_test.go
pull.go Another round of db.DefaultContext refactor (#27103) (#27262) 2023-09-25 19:24:35 +02:00
reaction_test.go Another round of db.DefaultContext refactor (#27103) (#27262) 2023-09-25 19:24:35 +02:00
reaction.go Another round of db.DefaultContext refactor (#27103) (#27262) 2023-09-25 19:24:35 +02:00
review_list.go Another round of db.DefaultContext refactor (#27103) (#27262) 2023-09-25 19:24:35 +02:00
review_test.go Fix 500 when deleting a dismissed review (#27903) (#27910) 2023-11-05 13:59:11 +00:00
review.go Fix inperformant query on retrifing review from database. (#28552) (#28562) 2023-12-20 16:55:08 +01:00
stopwatch_test.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
stopwatch.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
tracked_time_test.go
tracked_time.go