diff options
author | bptato <nincsnevem662@gmail.com> | 2022-01-19 20:58:43 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-01-19 20:58:43 +0100 |
commit | 5d90347a5627346ea95809781f321a0011257b32 (patch) | |
tree | 5bb99448bfabefb2c939ccdc0bb9f30b930da89d /src/types | |
parent | d3692eb681e20f8076d2184cd54861ef8d12e31b (diff) | |
download | chawan-5d90347a5627346ea95809781f321a0011257b32.tar.gz |
Fix percent encoding function and local percent encoded paths
Diffstat (limited to 'src/types')
-rw-r--r-- | src/types/url.nim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/types/url.nim b/src/types/url.nim index 81ae4ea4..4e1a52f7 100644 --- a/src/types/url.nim +++ b/src/types/url.nim @@ -791,6 +791,13 @@ func serialize*(path: UrlPath): string {.inline.} = result &= '/' result &= s +func serialize_unicode*(path: UrlPath): string {.inline.} = + if path.opaque: + return percentDecode(path.s) + for s in path.ss: + result &= '/' + result &= percentDecode(s) + func serialize*(url: Url, excludefragment = false): string = result = url.scheme & ':' if url.host.issome: |