pull/1061/head
gedoor 4 years ago
parent 0b0ca0c6cf
commit 7203a948a5
  1. 4
      app/src/main/java/io/legado/app/utils/HtmlFormatter.kt

@ -23,7 +23,7 @@ object HtmlFormatter {
fun formatKeepImg(html: String?, redirectUrl: URL?): String { fun formatKeepImg(html: String?, redirectUrl: URL?): String {
html ?: return "" html ?: return ""
val sb = StringBuffer() val sb = StringBuffer()
val matcher = AppPattern.imgPattern.matcher(html) val matcher = AppPattern.imgPattern.matcher(formatKeepImg(html))
var appendPos = 0 var appendPos = 0
while (matcher.find()) { while (matcher.find()) {
val urlArray = matcher.group(1)!!.split(AnalyzeUrl.splitUrlRegex) val urlArray = matcher.group(1)!!.split(AnalyzeUrl.splitUrlRegex)
@ -38,7 +38,7 @@ object HtmlFormatter {
if (appendPos < html.length) { if (appendPos < html.length) {
sb.append(html.substring(appendPos, html.length)) sb.append(html.substring(appendPos, html.length))
} }
return formatKeepImg(sb.toString()) return sb.toString()
} }
} }

Loading…
Cancel
Save