From 54a4a85b583923c7bdde90fa67689e1ab1df60f5 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Tue, 12 Nov 2019 19:12:19 -0500 Subject: [PATCH] twitter archive escapes html entities in plain text... --- import.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/import.go b/import.go index 7e8c017..9895ee3 100644 --- a/import.go +++ b/import.go @@ -18,6 +18,7 @@ package main import ( "encoding/json" "fmt" + "html" "io/ioutil" "log" "os" @@ -102,6 +103,8 @@ func importTwitter(username, source string) { Whofore: 2, } noise := t.Full_text + // unbelievable + noise = html.UnescapeString(noise) for _, r := range t.Entities.Urls { noise = strings.Replace(noise, r.Url, r.Expanded_url, -1) }