From f408209565ab8eee7fbcde764bace6df1e0cee3c Mon Sep 17 00:00:00 2001 From: M17764017422 <31874069+M17764017422@users.noreply.github.com> Date: Tue, 4 Feb 2020 21:42:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86=E6=9C=97=E8=AF=BB=E6=9D=82?= =?UTF-8?q?=E9=9F=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt index ffb5c4994..d497ccb06 100644 --- a/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt +++ b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt @@ -155,7 +155,9 @@ class ReadRssActivity : VMBaseActivity(R.layout.activity_rss_r webView.settings.javaScriptEnabled = true webView.evaluateJavascript("document.documentElement.outerHTML") { val html = StringEscapeUtils.unescapeJson(it) - viewModel.readAloud(Jsoup.clean(html, Whitelist.none())) + val 需读内容 = Jsoup.clean(html, Whitelist.none()).replace(Regex("""&\w+;"""),"").trim()//朗读过程中总是听到一些杂音,清理一下 + //longToast(需读内容)调试一下 + viewModel.readAloud(需读内容) } } }