Adds html entity unescaping

This commit is contained in:
sloum 2020-09-15 21:34:21 -07:00
parent 9967d08e10
commit cb14d2ddfa

View File

@ -2,6 +2,7 @@ package gemini
import ( import (
"fmt" "fmt"
"html"
"strings" "strings"
) )
@ -23,6 +24,7 @@ func ParseHTML(body, currentURL string) (string, []string) {
body = strings.Replace(body, "<", " <", -1) body = strings.Replace(body, "<", " <", -1)
body = strings.Replace(body, ">", "> ", -1) body = strings.Replace(body, ">", "> ", -1)
body = html.UnescapeString(body)
fields = strings.Fields(body) fields = strings.Fields(body)
var text string var text string