diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSoup.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSoup.kt index bf00f0d43..8dfe92acc 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSoup.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSoup.kt @@ -3,6 +3,7 @@ package io.legado.app.model.analyzeRule import android.text.TextUtils.isEmpty import android.text.TextUtils.join import androidx.annotation.Keep +import io.legado.app.utils.htmlFormat import io.legado.app.utils.splitNotBlank import org.jsoup.Jsoup import org.jsoup.nodes.Element @@ -379,7 +380,7 @@ class AnalyzeByJSoup { "html" -> { elements.select("script").remove() elements.select("style").remove() - val html = elements.outerHtml() + val html = elements.outerHtml().htmlFormat() textS.add(html) } "all" -> textS.add(elements.outerHtml()) diff --git a/app/src/main/java/io/legado/app/model/webBook/BookContent.kt b/app/src/main/java/io/legado/app/model/webBook/BookContent.kt index b17c5e4ff..ffcc09bd5 100644 --- a/app/src/main/java/io/legado/app/model/webBook/BookContent.kt +++ b/app/src/main/java/io/legado/app/model/webBook/BookContent.kt @@ -10,7 +10,6 @@ import io.legado.app.model.Debug import io.legado.app.model.analyzeRule.AnalyzeRule import io.legado.app.model.analyzeRule.AnalyzeUrl import io.legado.app.utils.NetworkUtils -import io.legado.app.utils.htmlFormat import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.withContext @@ -96,7 +95,7 @@ object BookContent { } } content.deleteCharAt(content.length - 1) - var contentStr = content.toString().htmlFormat() + var contentStr = content.toString() val replaceRegex = bookSource.ruleContent?.replaceRegex?.trim() if (!replaceRegex.isNullOrEmpty()) { contentStr = AnalyzeRule(book).setContent(contentStr).getString(replaceRegex)