Unescape strings in SC user info.

This commit is contained in:
Andreas Neue 2016-01-21 22:10:04 +01:00
parent 50e7e489c8
commit 3a93c6324a
1 changed files with 4 additions and 3 deletions

View File

@ -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: <none>"
}