1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00
gitea/modules/markup
Yarden Shoham f5ce2ed292
Allow all URL schemes in Markdown links by default (#24805)
- Closes #21146
- Closes #16721

## ⚠️ BREAKING ⚠️
This changes the default behavior to now create links for any URL scheme
when the user uses the markdown form for links (`[label](URL)`), this
doesn't affect the rendering of inline links. To opt-out set the
`markdown.CUSTOM_URL_SCHEMES` setting to a list of allowed schemes, all
other schemes (except `http` and `https`) won't be allowed.

# Before

![image](https://github.com/go-gitea/gitea/assets/20454870/35fa18ce-7dda-4995-b5b3-3f360f38296d)

# After

![image](https://github.com/go-gitea/gitea/assets/20454870/0922216b-0b35-4b77-9919-21a5c21dd5d0)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2023-05-19 17:17:07 +02:00
..
asciicast Support asciicast files as new markup (#22448) 2023-01-18 08:46:58 +08:00
common Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
console Add context when rendering labels or emojis (#23281) 2023-03-05 22:59:05 +01:00
csv Add context when rendering labels or emojis (#23281) 2023-03-05 22:59:05 +01:00
external Log STDERR of external renderer when it fails (#22442) 2023-01-13 20:41:23 +00:00
markdown Merge setting.InitXXX into one function with options (#24389) 2023-05-04 11:55:35 +08:00
mdstripper Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
orgmode Add context when rendering labels or emojis (#23281) 2023-03-05 22:59:05 +01:00
camo_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
camo.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
html_internal_test.go Append (comment) when a link points at a comment rather than the whole issue (#23734) 2023-04-03 16:02:57 +08:00
html_test.go Merge setting.InitXXX into one function with options (#24389) 2023-05-04 11:55:35 +08:00
html.go Append (comment) when a link points at a comment rather than the whole issue (#23734) 2023-04-03 16:02:57 +08:00
renderer_test.go Move IsReadmeFile* from modules/markup/ to modules/util (#22877) 2023-02-13 15:01:09 -05:00
renderer.go Improve Wiki TOC (#24137) 2023-04-17 15:05:19 -04:00
sanitizer_test.go Allow all URL schemes in Markdown links by default (#24805) 2023-05-19 17:17:07 +02:00
sanitizer.go Allow all URL schemes in Markdown links by default (#24805) 2023-05-19 17:17:07 +02:00