Undo colon escaping

This commit is contained in:
Martin Fietz 2016-02-12 09:08:06 +01:00
parent 7436e9c030
commit 438a9c2a4b
1 changed files with 8 additions and 2 deletions

View File

@ -735,13 +735,19 @@ public class GpodnetService {
List<String> added = new LinkedList<String>(); List<String> added = new LinkedList<String>();
JSONArray jsonAdded = object.getJSONArray("add"); JSONArray jsonAdded = object.getJSONArray("add");
for (int i = 0; i < jsonAdded.length(); i++) { for (int i = 0; i < jsonAdded.length(); i++) {
added.add(jsonAdded.getString(i)); String addedUrl = jsonAdded.getString(i);
// gpodder escapes colons unnecessarily
addedUrl = addedUrl.replace("%3A", ":");
added.add(addedUrl);
} }
List<String> removed = new LinkedList<String>(); List<String> removed = new LinkedList<String>();
JSONArray jsonRemoved = object.getJSONArray("remove"); JSONArray jsonRemoved = object.getJSONArray("remove");
for (int i = 0; i < jsonRemoved.length(); i++) { for (int i = 0; i < jsonRemoved.length(); i++) {
removed.add(jsonRemoved.getString(i)); String removedUrl = jsonRemoved.getString(i);
// gpodder escapes colons unnecessarily
removedUrl = removedUrl.replace("%3A", ":");
removed.add(removedUrl);
} }
long timestamp = object.getLong("timestamp"); long timestamp = object.getLong("timestamp");