mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Backport #15096 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
		@@ -312,7 +312,7 @@ func (ctx *postProcessCtx) postProcess(rawHTML []byte) ([]byte, error) {
 | 
				
			|||||||
	_, _ = res.WriteString("<html><body>")
 | 
						_, _ = res.WriteString("<html><body>")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Strip out nuls - they're always invalid
 | 
						// Strip out nuls - they're always invalid
 | 
				
			||||||
	_, _ = nulCleaner.WriteString(res, string(tagCleaner.ReplaceAll(rawHTML, []byte("<$1"))))
 | 
						_, _ = res.Write(tagCleaner.ReplaceAll([]byte(nulCleaner.Replace(string(rawHTML))), []byte("<$1")))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// close the tags
 | 
						// close the tags
 | 
				
			||||||
	_, _ = res.WriteString("</body></html>")
 | 
						_, _ = res.WriteString("</body></html>")
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user