链接以javascript开头时返回""

pull/1511/head
Xwite 3 years ago
parent 3202cd195a
commit 9bf98783df
  1. 2
      app/src/main/java/io/legado/app/utils/NetworkUtils.kt

@ -109,6 +109,7 @@ object NetworkUtils {
fun getAbsoluteURL(baseURL: String?, relativePath: String): String {
if (baseURL.isNullOrEmpty()) return relativePath
if (relativePath.isAbsUrl()) return relativePath
if (relativePath.startsWith("javascript")) return ""
var relativeUrl = relativePath
try {
val absoluteUrl = URL(baseURL.substringBefore(","))
@ -126,6 +127,7 @@ object NetworkUtils {
*/
fun getAbsoluteURL(baseURL: URL?, relativePath: String): String {
if (baseURL == null) return relativePath
if (relativePath.startsWith("javascript")) return ""
var relativeUrl = relativePath
try {
val parseUrl = URL(baseURL, relativePath)

Loading…
Cancel
Save