pull/84/head
kunfei 5 years ago
parent 8c22b09cc2
commit 325228aab6
  1. 8
      app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt

@ -73,7 +73,13 @@ class ReadRssActivity : VMBaseActivity<ReadRssViewModel>(R.layout.activity_rss_r
val url = NetworkUtils.getAbsoluteURL(it.origin, it.link) val url = NetworkUtils.getAbsoluteURL(it.origin, it.link)
val html = viewModel.clHtml(content) val html = viewModel.clHtml(content)
if (viewModel.rssSource?.loadWithBaseUrl == true) { if (viewModel.rssSource?.loadWithBaseUrl == true) {
webView.loadDataWithBaseURL(null, html, "text/html", "utf-8", url)//Referer会导致一些有反盗链的图片无法加载,暂时先用null应该还有更好的办法 webView.loadDataWithBaseURL(
url,
html,
"text/html",
"utf-8",
url
)//不想用baseUrl进下一个吧
} else { } else {
webView.loadData(html, "text/html;charset=utf-8", "utf-8")//经测试可以解决中文乱码 webView.loadData(html, "text/html;charset=utf-8", "utf-8")//经测试可以解决中文乱码
} }

Loading…
Cancel
Save