forked from an/flokati
Unescape strings in SC user info.
This commit is contained in:
parent
50e7e489c8
commit
3a93c6324a
|
@ -5,6 +5,7 @@ package sc
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"html"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
@ -173,12 +174,12 @@ func showCitizen(handle string) {
|
||||||
rank := reRank.FindStringSubmatch(string(body))
|
rank := reRank.FindStringSubmatch(string(body))
|
||||||
if len(name) > 1 {
|
if len(name) > 1 {
|
||||||
sayCh <- "*\n*** Citizen Info ***"
|
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" + "URL: " + QUERY_CIT_URL + string(handle_[1])
|
||||||
sayCh <- "*\n" + "UEE #: " + string(record[1])
|
sayCh <- "*\n" + "UEE #: " + string(record[1])
|
||||||
if len(org) > 1 {
|
if len(org) > 1 {
|
||||||
sayCh <- "*\n" + "Organization: " + string(org[1]) + " [" + string(sid[1]) + "]"
|
sayCh <- "*\n" + "Organization: " + html.UnescapeString(string(org[1])) + " [" + string(sid[1]) + "]"
|
||||||
sayCh <- "*\n" + "Rank: " + string(rank[1])
|
sayCh <- "*\n" + "Rank: " + html.UnescapeString(string(rank[1]))
|
||||||
} else {
|
} else {
|
||||||
sayCh <- "*\n" + "Organization: <none>"
|
sayCh <- "*\n" + "Organization: <none>"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue