Fixed URL encoding

This commit is contained in:
Erik C. Thauvin 2022-10-22 01:24:31 -07:00
parent 3a37899d0c
commit e5d9ff7120
5 changed files with 11 additions and 8 deletions

View file

@ -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", "~")
}
/**