mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
bugfix: fixing regex special chars break it
Special chars breaks regex Regex is differently between jvm and android Credit for bugfix @Lag bug found @int3debug
This commit is contained in:
parent
6df3ef14f6
commit
0c9df7602a
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
package com.lagradost.cloudstream3.utils
|
package com.lagradost.cloudstream3.utils
|
||||||
|
|
||||||
import com.lagradost.cloudstream3.mvvm.logError
|
import com.lagradost.safefile.logError
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
import kotlin.math.pow
|
import kotlin.math.pow
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ class JsUnpacker(packedJS: String?) {
|
||||||
throw Exception("Unknown p.a.c.k.e.r. encoding")
|
throw Exception("Unknown p.a.c.k.e.r. encoding")
|
||||||
}
|
}
|
||||||
val unbase = Unbase(radix)
|
val unbase = Unbase(radix)
|
||||||
p = Pattern.compile("\\b\\w+\\b")
|
p = Pattern.compile("""\b[a-zA-Z0-9_]+\b""")
|
||||||
m = p.matcher(payload)
|
m = p.matcher(payload)
|
||||||
val decoded = StringBuilder(payload)
|
val decoded = StringBuilder(payload)
|
||||||
var replaceOffset = 0
|
var replaceOffset = 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue