forgejo/modules/markup
Gusted 65b9a959b8
[BUG] Restrict when to make link absolute in markdown
- In markdown, links are proccessed to be made absolute against the
relevant base in that context. Such that `./src` will be transformed
into `http://example.com/owner/repo/src/branch/main/src`.
- Don't try to make the link absolute if the link has a schema that's
defined in `[markdown].CUSTOM_URL_SCHEMES`, because they can't be made
absolute and doing so could lead to problems (see test case, double
slash was transformed to single slash).
- Adds unit test.
- Resolves https://codeberg.org/Codeberg/Community/issues/1489
2024-02-19 20:56:00 +01:00
..
asciicast
common
console
csv
external
markdown [BUG] Restrict when to make link absolute in markdown 2024-02-19 20:56:00 +01:00
mdstripper
orgmode
camo.go
camo_test.go
html.go
html_internal_test.go
html_test.go
renderer.go
renderer_test.go
sanitizer.go
sanitizer_test.go