Merge pull request #84 from M17764017422/patch-2

清理朗读杂音
pull/90/head^2 3.20.020513
kunfei 5 years ago committed by GitHub
commit 5fbc254ec5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt

@ -159,7 +159,9 @@ class ReadRssActivity : VMBaseActivity<ReadRssViewModel>(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(需读内容)
}
}
}

Loading…
Cancel
Save