From: David ‘Bombe’ Roden Date: Sun, 20 Sep 2015 07:20:48 +0000 (+0200) Subject: Replace space characters in URLs with encoded values X-Git-Tag: v2~152 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=68339259a94a4d4eddc6294df73ba68a4cebea11;p=rhynodge.git Replace space characters in URLs with encoded values --- diff --git a/src/main/java/net/pterodactylus/rhynodge/filters/ComicSiteFilter.java b/src/main/java/net/pterodactylus/rhynodge/filters/ComicSiteFilter.java index 1d9e6f7..39da74d 100644 --- a/src/main/java/net/pterodactylus/rhynodge/filters/ComicSiteFilter.java +++ b/src/main/java/net/pterodactylus/rhynodge/filters/ComicSiteFilter.java @@ -65,7 +65,7 @@ public abstract class ComicSiteFilter implements Filter { for (String imageUrl : imageUrls) { String imageComment = (imageCounter < imageComments.size()) ? imageComments.get(imageCounter) : ""; try { - URI stripUri = new URI(htmlState.uri()).resolve(imageUrl); + URI stripUri = new URI(htmlState.uri()).resolve(imageUrl.replaceAll(" ", "%20")); Strip strip = new Strip(stripUri.toString(), imageComment); imageCounter++; comic.add(strip);