Merge branch 'r3.0' of https://github.com/osmandapp/Osmand into r3.0
This commit is contained in:
commit
c7d77a1373
1 changed files with 2 additions and 1 deletions
|
@ -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)};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue