From 95d6de3d6b18b89619e0c362e11e24b66a7e032c Mon Sep 17 00:00:00 2001 From: Xwite <82232510+Xwite@users.noreply.github.com> Date: Mon, 3 Oct 2022 16:33:56 +0800 Subject: [PATCH] Update AnalyzeUrl.kt --- .../main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt index 53101725c..f35ca3965 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt @@ -220,10 +220,8 @@ class AnalyzeUrl( queryStr = fieldsTxt val queryS = fieldsTxt.splitNotBlank("&") for (query in queryS) { - val separator = query.indexOf("=") - if (separator == -1) continue - val value = query.slice(separator + 1) - val key = query.slice(0, separator) + val value = query.substringAfter("=") + val key = query.substringBefore("=") if (charset.isNullOrEmpty()) { if (NetworkUtils.hasUrlEncoded(value)) { fieldMap[key] = value