aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-08-15 19:43:00 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2021-08-15 19:43:00 +0200
commitee91e94c7b78cc65f2e7db11cc58d41d92faa038 (patch)
tree046ad3a18294a22010732525982f096cc9f83246
parentAdd comment about "bug" where calendars where missing their names. (diff)
downloadcalp-ee91e94c7b78cc65f2e7db11cc58d41d92faa038.tar.gz
calp-ee91e94c7b78cc65f2e7db11cc58d41d92faa038.tar.xz
Fix encode-query-parameters.
Multiple parameters are now correctly joined by an ampersand. Also noticed that the given parameters should use the regular ->string for encoding strings.
-rw-r--r--module/calp/html/vcomponent.scm2
-rw-r--r--module/web/uri-query.scm3
2 files changed, 3 insertions, 2 deletions
diff --git a/module/calp/html/vcomponent.scm b/module/calp/html/vcomponent.scm
index 29aa43f2..1f51e40f 100644
--- a/module/calp/html/vcomponent.scm
+++ b/module/calp/html/vcomponent.scm
@@ -126,7 +126,7 @@
"/search/?"
,(encode-query-parameters
`((q . (member
- ,(->quoted-string c)
+ ,(->string c)
(or (prop event 'CATEGORIES)
'())))))))
,c))
diff --git a/module/web/uri-query.scm b/module/web/uri-query.scm
index efdd178a..9eff203f 100644
--- a/module/web/uri-query.scm
+++ b/module/web/uri-query.scm
@@ -10,5 +10,6 @@
(format #f "~a=~a"
(car p)
(uri-encode (->quoted-string (cdr p)))))
- parameters)))
+ parameters)
+ "&"))