0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-01-09 16:10:50 -05:00
forgejo/modules/markup
Gusted 6c100083c2
[BUG] Restrict when to make link absolute in markdown
- Backport of #2403
- 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

(cherry picked from commit 65b9a959b8)
2024-02-19 23:30:12 +01:00
..
asciicast
common [GITEA] test markdown CleanValue to prevent regression 2023-12-13 18:12:08 +01:00
console
csv
external Rework markup link rendering (#26745) (#28803) 2024-01-16 14:41:11 +00:00
markdown [BUG] Restrict when to make link absolute in markdown 2024-02-19 23:30:12 +01:00
mdstripper
orgmode [BUG] Fix relative links on orgmode 2024-02-19 12:15:40 +01:00
camo.go
camo_test.go
html.go Rework markup link rendering (#26745) (#28803) 2024-01-16 14:41:11 +00:00
html_internal_test.go Rework markup link rendering (#26745) (#28803) 2024-01-16 14:41:11 +00:00
html_test.go Rework markup link rendering (#26745) (#28803) 2024-01-16 14:41:11 +00:00
renderer.go Rework markup link rendering (#26745) (#28803) 2024-01-16 14:41:11 +00:00
renderer_test.go
sanitizer.go [GITEA] Use restricted sanitizer for repository description 2023-11-13 14:06:30 +01:00
sanitizer_test.go [GITEA] Use restricted sanitizer for repository description 2023-11-13 14:06:30 +01:00