瀏覽代碼

Sanitize spaces when setting URLs without domain

It throws an URISyntaxException otherwise.
arkon 3 年之前
父節點
當前提交
ed80ee98a7
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/src/main/java/eu/kanade/tachiyomi/source/online/HttpSource.kt

+ 1 - 1
app/src/main/java/eu/kanade/tachiyomi/source/online/HttpSource.kt

@@ -341,7 +341,7 @@ abstract class HttpSource : CatalogueSource {
      */
     private fun getUrlWithoutDomain(orig: String): String {
         return try {
-            val uri = URI(orig)
+            val uri = URI(orig.replace(" ", "%20"))
             var out = uri.path
             if (uri.query != null) {
                 out += "?" + uri.query