mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 00:20:25 +08:00 
			
		
		
		
	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  # After  --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
		@@ -1327,6 +1327,7 @@ ROUTER = console
 | 
			
		||||
;; Comma separated list of custom URL-Schemes that are allowed as links when rendering Markdown
 | 
			
		||||
;; for example git,magnet,ftp (more at https://en.wikipedia.org/wiki/List_of_URI_schemes)
 | 
			
		||||
;; URLs starting with http and https are always displayed, whatever is put in this entry.
 | 
			
		||||
;; If this entry is empty, all URL schemes are allowed.
 | 
			
		||||
;CUSTOM_URL_SCHEMES =
 | 
			
		||||
;;
 | 
			
		||||
;; List of file extensions that should be rendered/edited as Markdown
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user