From 3a93c6324a5f339b2595a3a0b24e9f81389a8742 Mon Sep 17 00:00:00 2001 From: Andreas Neue Date: Thu, 21 Jan 2016 22:10:04 +0100 Subject: [PATCH] Unescape strings in SC user info. --- modules/sc/sc.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/sc/sc.go b/modules/sc/sc.go index 3c18b2c..bd05171 100644 --- a/modules/sc/sc.go +++ b/modules/sc/sc.go @@ -5,6 +5,7 @@ package sc import ( "encoding/json" "fmt" + "html" "io/ioutil" "log" "net/http" @@ -173,12 +174,12 @@ func showCitizen(handle string) { rank := reRank.FindStringSubmatch(string(body)) if len(name) > 1 { sayCh <- "*\n*** Citizen Info ***" - sayCh <- "*\n" + "Name: " + string(name[1]) + " [" + string(handle_[1]) + "]" + sayCh <- "*\n" + "Name: " + html.UnescapeString(string(name[1])) + " [" + string(handle_[1]) + "]" sayCh <- "*\n" + "URL: " + QUERY_CIT_URL + string(handle_[1]) sayCh <- "*\n" + "UEE #: " + string(record[1]) if len(org) > 1 { - sayCh <- "*\n" + "Organization: " + string(org[1]) + " [" + string(sid[1]) + "]" - sayCh <- "*\n" + "Rank: " + string(rank[1]) + sayCh <- "*\n" + "Organization: " + html.UnescapeString(string(org[1])) + " [" + string(sid[1]) + "]" + sayCh <- "*\n" + "Rank: " + html.UnescapeString(string(rank[1])) } else { sayCh <- "*\n" + "Organization: " }