From 18a8449fd83d65c192008a0537b03bfce8bf0624 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Wed, 16 May 2018 16:07:44 +0200 Subject: [PATCH] Fix bugs with navigation menu & with banner image --- .../src/net/osmand/plus/wikivoyage/data/TravelArticle.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelArticle.java b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelArticle.java index ca252f115d..4f04fd2abc 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelArticle.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelArticle.java @@ -2,6 +2,7 @@ package net.osmand.plus.wikivoyage.data; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; +import java.net.URLEncoder; import android.support.annotation.NonNull; import android.support.annotation.Nullable; @@ -111,6 +112,11 @@ public class TravelArticle { System.err.println(e.getMessage()); } String[] hash = getHash(imageTitle); + try { + imageTitle = URLEncoder.encode(imageTitle, "UTF-8"); + } catch (UnsupportedEncodingException e) { + System.err.println(e.getMessage()); + } String prefix = thumbnail ? THUMB_PREFIX : REGULAR_PREFIX; return IMAGE_ROOT_URL + "thumb/" + hash[0] + "/" + hash[1] + "/" + imageTitle + "/" + prefix + imageTitle; }