You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/modules/markup
KN4CK3R a09b40de8d
Prevent double sanitize (#16386)
* Prevent double sanitize.
* Use SanitizeReaderToWriter.

At the moment `actualRender` uses `SanitizeReader` to sanitize the output. But `SanitizeReader` gets called in `markup.render` too so the output gets sanitized twice.

I moved the `SanitizeReader` call into `RenderRaw` because this method does not use `markup.render`. I would like to remove the `RenderRaw`/`RenderRawString` methods too because they are only called from tests, the fuzzer and the `/markup/raw` api endpoint. This endpoint is not in use so I think we could remove them. If we really in the future need a method to render markdown without PostProcessing we could achieve this with a more flexible `renderer.NeedPostProcess` method.
3 years ago
..
common Fix some lints (#17337) 3 years ago
csv Properly determine CSV delimiter (#17459) 3 years ago
external refactor: move from io/ioutil to io and os package (#17109) 3 years ago
markdown Prevent double sanitize (#16386) 3 years ago
mdstripper A better go code formatter, and now `make fmt` can run in Windows (#17684) 3 years ago
orgmode Prevent panic in Org mode HighlightCodeBlock (#17140) 3 years ago
html.go Fix issue markdown bugs (#17411) 3 years ago
html_internal_test.go Fix issue markdown bugs (#17411) 3 years ago
html_test.go Fix NPE in fuzzer (#16680) 3 years ago
renderer.go Prevent double sanitize (#16386) 3 years ago
renderer_test.go A better go code formatter, and now `make fmt` can run in Windows (#17684) 3 years ago
sanitizer.go Prevent double sanitize (#16386) 3 years ago
sanitizer_test.go Fix data URI scramble (#16098) 3 years ago