Fixed URL encoding
This commit is contained in:
parent
3a37899d0c
commit
e5d9ff7120
5 changed files with 11 additions and 8 deletions
|
@ -45,7 +45,10 @@ enum class Format(val type: String) {
|
|||
}
|
||||
|
||||
fun String.encode(): String {
|
||||
return URLEncoder.encode(this, StandardCharsets.UTF_8).replace("+", "%20").replace("*", "%2A").replace("%7E", "~")
|
||||
return URLEncoder.encode(this, StandardCharsets.UTF_8)
|
||||
.replace("+", "%20")
|
||||
.replace("*", "%2A")
|
||||
.replace("%7E", "~")
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue