gitea/modules/markup
Earl Warren 1075ff74b5
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 631c87cc2347f0036a75dcd21e24429bbca28207)

Co-authored-by: Gusted <postmaster@gusted.xyz>
..
asciicast
common Make `user-content-* ` consistent with github ()
console Add context when rendering labels or emojis ()
csv Add context when rendering labels or emojis ()
external Log STDERR of external renderer when it fails ()
markdown Upgrade to golangci-lint@v1.55.0 ()
mdstripper Implement FSFE REUSE for golang files ()
orgmode Remove `title` from elements on Org mode ()
camo.go
camo_test.go
html.go Render email addresses as such if followed by punctuation ()
html_internal_test.go Do not highlight `#number` in documents ()
html_test.go Render email addresses as such if followed by punctuation ()
renderer.go Add RTL rendering support to Markdown ()
renderer_test.go Move `IsReadmeFile*` from `modules/markup/` to `modules/util` ()
sanitizer.go Use restricted sanitizer for repository description ()
sanitizer_test.go Use restricted sanitizer for repository description ()