Replace space characters in URLs with encoded values
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 20 Sep 2015 07:20:48 +0000 (09:20 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 20 Sep 2015 07:20:48 +0000 (09:20 +0200)
src/main/java/net/pterodactylus/rhynodge/filters/ComicSiteFilter.java

index 1d9e6f7..39da74d 100644 (file)
@@ -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);