pull/90/head^2
kunfei 5 years ago
parent 5fbc254ec5
commit 5a20999017
  1. 5
      app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt

@ -159,9 +159,10 @@ class ReadRssActivity : VMBaseActivity<ReadRssViewModel>(R.layout.activity_rss_r
webView.settings.javaScriptEnabled = true webView.settings.javaScriptEnabled = true
webView.evaluateJavascript("document.documentElement.outerHTML") { webView.evaluateJavascript("document.documentElement.outerHTML") {
val html = StringEscapeUtils.unescapeJson(it) val html = StringEscapeUtils.unescapeJson(it)
val 需读内容 = Jsoup.clean(html, Whitelist.none()).replace(Regex("""&\w+;"""),"").trim()//朗读过程中总是听到一些杂音,清理一下 val text = Jsoup.clean(html, Whitelist.none()).replace(Regex("""&\w+;"""), "")
.trim()//朗读过程中总是听到一些杂音,清理一下
//longToast(需读内容)调试一下 //longToast(需读内容)调试一下
viewModel.readAloud(需读内容) viewModel.readAloud(text)
} }
} }
} }

Loading…
Cancel
Save