forgejo/modules/markup
Gusted 4b9a473e12
[GITEA] Use restricted sanitizer for repository description
- Backport of https://codeberg.org/forgejo/forgejo/pulls/1433
  - 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-13 17:17:37 +02:00
..
asciicast
common
console
csv
external
markdown Replace interface{} with any (#25686) (#25687) 2023-07-04 23:41:32 -04:00
mdstripper
orgmode [GITEA] Fix media description render for orgmode 2023-08-12 16:04:33 +02:00
camo.go
camo_test.go
html.go Add RTL rendering support to Markdown (#24816) 2023-05-20 23:02:52 +02:00
html_internal_test.go Replace interface{} with any (#25686) (#25687) 2023-07-04 23:41:32 -04:00
html_test.go Refactor path & config system (#25330) (#25416) 2023-06-22 16:27:18 +00:00
renderer.go Add RTL rendering support to Markdown (#24816) 2023-05-20 23:02:52 +02:00
renderer_test.go
sanitizer.go [GITEA] Use restricted sanitizer for repository description 2023-09-13 17:17:37 +02:00
sanitizer_test.go [GITEA] Use restricted sanitizer for repository description 2023-09-13 17:17:37 +02:00