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 cf11dbb72..38fb633c5 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 @@ -359,8 +359,7 @@ class AnalyzeByJSoup { try { when (lastRule) { "text" -> for (element in elements) { - val text = element.text() - textS.add(text) + textS.add(element.text()) } "textNodes" -> for (element in elements) { val tn = arrayListOf() @@ -373,12 +372,15 @@ class AnalyzeByJSoup { } textS.add(join("\n", tn)) } - "ownText", "html" -> { - elements.select("script").remove() + "ownText" -> for (element in elements) { + textS.add(element.ownText()) + } + "html" -> { + elements.select("script, style").remove() val html = elements.html() textS.add(html) } - "all" -> textS.add(elements.html()) + "all" -> textS.add(elements.outerHtml()) else -> for (element in elements) { val url = element.attr(lastRule) if (!isEmpty(url) && !textS.contains(url)) {