mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 19:38:23 +00:00 
			
		
		
		
	Security: prevent XSS attach on wiki page
Reported by Miguel Ángel Jimeno.
This commit is contained in:
		
				
					committed by
					
						 Kim "BKC" Carlbäcker
						Kim "BKC" Carlbäcker
					
				
			
			
				
	
			
			
			
						parent
						
							43c94d0a6c
						
					
				
				
					commit
					134f3e6e09
				
			| @@ -15,6 +15,7 @@ import ( | ||||
| 	"strings" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/microcosm-cc/bluemonday" | ||||
| 	"golang.org/x/net/html/charset" | ||||
| 	"golang.org/x/text/transform" | ||||
| 	"gopkg.in/editorconfig/editorconfig-core-go.v1" | ||||
| @@ -61,6 +62,7 @@ func NewFuncMap() []template.FuncMap { | ||||
| 		}, | ||||
| 		"AvatarLink":   base.AvatarLink, | ||||
| 		"Safe":         Safe, | ||||
| 		"Sanitize":     bluemonday.UGCPolicy().Sanitize, | ||||
| 		"Str2html":     Str2html, | ||||
| 		"TimeSince":    base.TimeSince, | ||||
| 		"RawTimeSince": base.RawTimeSince, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user