forgejo/modules/markup
Gusted 0238587c51
[GITEA] Use restricted sanitizer for repository description
- 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 a8afa4cd18)
2023-09-18 16:15:52 +02:00
..
asciicast
common Make user-content-* consistent with github (#26388) 2023-08-09 09:30:31 +00:00
console
csv
external
markdown Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00
mdstripper
orgmode fix media description render for orgmode (#26895) 2023-09-13 05:44:59 +00:00
camo.go
camo_test.go
html.go Do not highlight #number in documents (#26365) 2023-08-07 15:11:25 +02:00
html_internal_test.go Do not highlight #number in documents (#26365) 2023-08-07 15:11:25 +02:00
html_test.go Do not highlight #number in documents (#26365) 2023-08-07 15:11:25 +02:00
renderer.go
renderer_test.go
sanitizer.go [GITEA] Use restricted sanitizer for repository description 2023-09-18 16:15:52 +02:00
sanitizer_test.go [GITEA] Use restricted sanitizer for repository description 2023-09-18 16:15:52 +02:00