From cb14d2ddfa45c7ac198cf244146e57745c2fd184 Mon Sep 17 00:00:00 2001 From: sloum Date: Tue, 15 Sep 2020 21:34:21 -0700 Subject: [PATCH] Adds html entity unescaping --- gemini/html_parser.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gemini/html_parser.go b/gemini/html_parser.go index c79c0fa..2151f5b 100644 --- a/gemini/html_parser.go +++ b/gemini/html_parser.go @@ -2,6 +2,7 @@ package gemini import ( "fmt" + "html" "strings" ) @@ -23,6 +24,7 @@ func ParseHTML(body, currentURL string) (string, []string) { body = strings.Replace(body, "<", " <", -1) body = strings.Replace(body, ">", "> ", -1) + body = html.UnescapeString(body) fields = strings.Fields(body) var text string