From 9de5ccb07f15ce794a94fec87c2d71026b4efc14 Mon Sep 17 00:00:00 2001 From: Ryan Stafford Date: Mon, 27 May 2024 14:20:45 -0400 Subject: [PATCH] dont escape html, gets messy with code blocks --- routes.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/routes.go b/routes.go index fb7a2f6..b7fa609 100644 --- a/routes.go +++ b/routes.go @@ -7,7 +7,6 @@ import ( "encoding/json" "errors" "fmt" - "html" "html/template" "io" "net/http" @@ -152,8 +151,6 @@ var funcMap = template.FuncMap{ body = re.ReplaceAllString(body, "\n***\n") // community bangs body = RegReplace(body, `([^\[])!([a-zA-Z0-9_]+)@([a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)+)`, `$1[!$2@$3](/c/$2@$3)`) - // escape HTML tags - body = html.EscapeString(body) if err := md.Convert([]byte(body), &buf); err != nil { fmt.Println(err) return template.HTML(body)