feat: 优化代码

pull/190/head
kunfei 5 years ago
parent 1a7f54a971
commit 24b0705346
  1. 1
      app/src/main/java/io/legado/app/help/http/AjaxWebView.kt

@ -180,6 +180,7 @@ class AjaxWebView {
mWebView.get()?.evaluateJavascript(mJavaScript) { mWebView.get()?.evaluateJavascript(mJavaScript) {
if (it.isNotEmpty() && it != "null") { if (it.isNotEmpty() && it != "null") {
val content = StringEscapeUtils.unescapeJson(it) val content = StringEscapeUtils.unescapeJson(it)
.replace("^\"|\"$".toRegex(), "")
handler.obtainMessage(MSG_SUCCESS, Res(url, content)) handler.obtainMessage(MSG_SUCCESS, Res(url, content))
.sendToTarget() .sendToTarget()
handler.removeCallbacks(this) handler.removeCallbacks(this)

Loading…
Cancel
Save