diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-09 10:17:29 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-09 10:17:29 +0200 |
commit | fb04413bfce4f910509ba0cce60dea124b0f1a16 (patch) | |
tree | abf2ef0850692d1d9657adbd2bf64a20a736e97d /module/server/util.scm | |
parent | Dynamicaly created popups now work. (diff) | |
download | calp-fb04413bfce4f910509ba0cce60dea124b0f1a16.tar.gz calp-fb04413bfce4f910509ba0cce60dea124b0f1a16.tar.xz |
Can create events with åäö again.
Diffstat (limited to 'module/server/util.scm')
-rw-r--r-- | module/server/util.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/module/server/util.scm b/module/server/util.scm index ada4f266..58a11ec3 100644 --- a/module/server/util.scm +++ b/module/server/util.scm @@ -4,14 +4,14 @@ :use-module (web uri)) -(define-public (parse-query query-string) +(define*-public (parse-query query-string optional: (encoding "UTF-8")) (unless (or (not query-string) (string-null? query-string)) (fold (lambda (str list) ;; only split on the first equal. ;; Does HTTP allow multiple equal signs in a data field? ;; NOTE that this fails if str lacks an equal sign. (define idx (string-index str #\=)) - (define key (uri-decode (substring str 0 idx))) - (define val (uri-decode (substring str (1+ idx)))) + (define key (uri-decode (substring str 0 idx) encoding: encoding)) + (define val (uri-decode (substring str (1+ idx)) encoding: encoding)) (cons* (-> key string->symbol symbol->keyword) val list)) '() (string-split query-string #\&)))) |