Merge pull request #5481 from osmandapp/PaulsBranch

Pauls branch
This commit is contained in:
vshcherb 2018-05-24 15:46:00 +02:00 committed by GitHub
commit 0af33195f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,6 +102,7 @@ public class TravelArticle {
@NonNull
public static String getImageUrl(@NonNull String imageTitle, boolean thumbnail) {
imageTitle = imageTitle.replace(" ", "_");
try {
imageTitle = URLDecoder.decode(imageTitle, "UTF-8");
} catch (UnsupportedEncodingException e) {
@ -120,7 +121,7 @@ public class TravelArticle {
@Size(2)
@NonNull
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)};
}
}