diff --git a/fdroid/index.go b/fdroid/index.go index 9e11e64..1716c19 100644 --- a/fdroid/index.go +++ b/fdroid/index.go @@ -7,6 +7,7 @@ import ( "encoding/json" "encoding/xml" "fmt" + "html" "io" "sort" "strings" @@ -272,6 +273,10 @@ func LoadIndexJSON(r io.Reader) (*Index, error) { if !enOK { english, enOK = app.Localized["en-US"] } + + // TODO: why does the json index contain html escapes? + app.Name = html.UnescapeString(app.Name) + if app.Summary == "" && enOK { app.Summary = english.Summary } @@ -284,6 +289,10 @@ func LoadIndexJSON(r io.Reader) (*Index, error) { apk := &index.Packages[app.PackageName][i] apk.AppID = app.PackageName apk.RepoURL = index.Repo.Address + + // TODO: why does the json index contain html escapes? + apk.VersName = html.UnescapeString(apk.VersName) + app.Apks = append(app.Apks, apk) } } diff --git a/testdata/scripts/show.txt b/testdata/scripts/show.txt index 4024df8..1aeda47 100644 --- a/testdata/scripts/show.txt +++ b/testdata/scripts/show.txt @@ -9,3 +9,9 @@ stdout 'fdroid/fdroidclient' fdroidcl show org.fdroid.fdroid org.fdroid.fdroid.privileged stdout 'fdroid/fdroidclient' stdout 'fdroid/privileged-extension' + +fdroidcl show org.pocketworkstation.pckeyboard info.metadude.android.bitsundbaeume.schedule +! stdout '&apos' +! stdout '&' +stdout 'Name.*Hacker''s Keyboard' +stdout 'Version.*Bits & Bäume'