fix: escape code blocks to prevent HTML injection
This commit is contained in:
@ -17,7 +17,7 @@ var plainFormattedCodeRegex = regexp.MustCompile(`(?s)<pre tabindex="0" class="c
|
||||
func HighlightSyntaxViaContent(content string) (htmlOut string) {
|
||||
content = html.UnescapeString(content)
|
||||
|
||||
fallbackOut := content
|
||||
fallbackOut := html.EscapeString(content)
|
||||
|
||||
// identify the language
|
||||
lexer := lexers.Analyse(content)
|
||||
|
Reference in New Issue
Block a user