Update AnalyzeUrl.kt

pull/2370/head
Xwite 2 years ago committed by GitHub
parent 93151737ae
commit 95d6de3d6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt

@ -220,10 +220,8 @@ class AnalyzeUrl(
queryStr = fieldsTxt queryStr = fieldsTxt
val queryS = fieldsTxt.splitNotBlank("&") val queryS = fieldsTxt.splitNotBlank("&")
for (query in queryS) { for (query in queryS) {
val separator = query.indexOf("=") val value = query.substringAfter("=")
if (separator == -1) continue val key = query.substringBefore("=")
val value = query.slice(separator + 1)
val key = query.slice(0, separator)
if (charset.isNullOrEmpty()) { if (charset.isNullOrEmpty()) {
if (NetworkUtils.hasUrlEncoded(value)) { if (NetworkUtils.hasUrlEncoded(value)) {
fieldMap[key] = value fieldMap[key] = value

Loading…
Cancel
Save