Merge branch 'r3.0' of https://github.com/osmandapp/Osmand into r3.0

This commit is contained in:
Dmitriy Prodchenko 2018-05-24 17:06:37 +03:00
commit c7d77a1373

View file

@ -102,6 +102,7 @@ public class TravelArticle {
@NonNull @NonNull
public static String getImageUrl(@NonNull String imageTitle, boolean thumbnail) { public static String getImageUrl(@NonNull String imageTitle, boolean thumbnail) {
imageTitle = imageTitle.replace(" ", "_");
try { try {
imageTitle = URLDecoder.decode(imageTitle, "UTF-8"); imageTitle = URLDecoder.decode(imageTitle, "UTF-8");
} catch (UnsupportedEncodingException e) { } catch (UnsupportedEncodingException e) {
@ -120,7 +121,7 @@ public class TravelArticle {
@Size(2) @Size(2)
@NonNull @NonNull
private static String[] getHash(@NonNull String s) { private static String[] getHash(@NonNull String s) {
String md5 = new String(Hex.encodeHex(DigestUtils.md5(s.replace(" ", "_")))); String md5 = new String(Hex.encodeHex(DigestUtils.md5(s)));
return new String[]{md5.substring(0, 1), md5.substring(0, 2)}; return new String[]{md5.substring(0, 1), md5.substring(0, 2)};
} }
} }