forked from NYANDEV/forgejo
17e70e401c
- Currently the repository description uses the same sanitizer as a
normal markdown document. This means that element such as heading and
images are allowed and can be abused.
- Create a minimal restricted sanitizer for the repository description,
which only allows what the postprocessor currently allows, which are
links and emojis.
- Added unit testing.
- Resolves https://codeberg.org/forgejo/forgejo/issues/1202
- Resolves https://codeberg.org/Codeberg/Community/issues/1122
(cherry picked from commit a8afa4cd181d7c31f73d6a8fae4c6a4b9622a425)
(cherry picked from commit 0238587c51e2c749413ca5a63e47590399fe5a2b)
(cherry picked from commit a8c7bbf728326b992e000a3d19c8833610f960c9)
(cherry picked from commit 80e05a8245092b4158c6c970ca0563181b40f2eb)
(cherry picked from commit f5af5050b34891ff16a4ef1f8e3d805fe135238d)
(cherry picked from commit 608f981e551db5f38550b622646cc307fe0566b9)
(cherry picked from commit 659186750201672391223fe4584b292e2ae26c62)
(cherry picked from commit b7e6dedafd84a7f240d7e36ce414659d3ecb7a84)
(cherry picked from commit 1cd196da49cbc352280affe8b391c70c95f64a81)
(cherry picked from commit
|
||
---|---|---|
.. | ||
archiver.go | ||
attachment.go | ||
attachment_test.go | ||
avatar.go | ||
collaboration.go | ||
collaboration_test.go | ||
fork.go | ||
fork_test.go | ||
git.go | ||
issue.go | ||
language_stats.go | ||
main_test.go | ||
mirror.go | ||
pushmirror.go | ||
pushmirror_test.go | ||
redirect.go | ||
redirect_test.go | ||
release.go | ||
release_test.go | ||
repo.go | ||
repo_indexer.go | ||
repo_list.go | ||
repo_list_test.go | ||
repo_test.go | ||
repo_unit.go | ||
repo_unit_test.go | ||
search.go | ||
star.go | ||
star_test.go | ||
topic.go | ||
topic_test.go | ||
update.go | ||
upload.go | ||
user_repo.go | ||
user_repo_test.go | ||
watch.go | ||
watch_test.go | ||
wiki.go | ||
wiki_test.go |