From 9812a01349a3da47c2c646b2e9cef59c6a511eee Mon Sep 17 00:00:00 2001 From: bushixuanqi <2208877960@qq.com> Date: Tue, 13 Jul 2021 01:24:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=93=BE=E6=8E=A5=E5=88=86?= =?UTF-8?q?=E5=89=B2=E8=A7=84=E5=88=99=EF=BC=8C=E9=81=BF=E5=85=8D=20,{c?= =?UTF-8?q?=E5=8F=82=E6=95=B0}=20=E7=9A=84=E5=AD=97=E7=AC=A6=E4=B8=B2?= =?UTF-8?q?=E4=B8=AD=E4=B9=9F=E5=AD=98=E5=9C=A8=20,{=20=EF=BC=8C=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E8=A7=84=E5=88=99=E5=88=87=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复这种页数列表写法中,js部分内含 < 或 > 就会切割错误的问题 优化格式化图片标签操作和匹配图片标签操作,加快图片处理速度 --- .../main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt | 2 +- .../main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt index 6bbd6f770..b8e503599 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt @@ -66,7 +66,7 @@ class AnalyzeRule(val ruleData: RuleDataInterface) : JsExtensions { fun setRedirectUrl(url: String): URL? { kotlin.runCatching { val pos = url.indexOf(',') - redirectUrl = URL( if(pos == -1)url else url.substring(pos+1).trim{ it < '!'} ) + redirectUrl = URL( if(pos == -1) url else url.substring(0,pos)) } return redirectUrl } 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 9848c2b44..e0ac417c9 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 @@ -56,7 +56,7 @@ class AnalyzeUrl( init { val pos = baseUrl.indexOf(',') - if(pos != -1)baseUrl = baseUrl.substring(0,pos).trim { it < '!' } + if(pos != -1)baseUrl = baseUrl.substring(0,pos) headerMapF?.let { headerMap.putAll(it) if (it.containsKey("proxy")) { @@ -160,7 +160,7 @@ class AnalyzeUrl( var pos = ruleUrl.indexOf(',') - urlHasQuery = if(pos == -1) ruleUrl else ruleUrl.substring(0,pos).trim{ it < '!'} + urlHasQuery = if(pos == -1) ruleUrl else ruleUrl.substring(0,pos) url = NetworkUtils.getAbsoluteURL(baseUrl,urlHasQuery )