allow _ for spaces

(easier to use in browsers/shells where spaces lead to unwanted
behaviour, e.g. starting a search or ending an argument)
This commit is contained in:
stuebinm 2023-07-09 02:29:04 +02:00
parent 6a61154bda
commit b231e47108

View file

@ -14,6 +14,7 @@ import gleam/map.{Map}
import gleam/uri
import gleam/hackney
import gleam/pair.{swap}
import gleam/result
import mist
const ds100_domain = "ds100.bahnhof.name"
@ -99,6 +100,7 @@ fn unpercent(encoded: String) -> String {
|> list.prepend(bit_string.from_string(head))
|> bit_string.concat
|> bit_string.to_string
|> result.map(fn (str) { string.replace(str, "_", " ") })
res
}