From bf3fb64088c08542552586f2b864522d8b410bda Mon Sep 17 00:00:00 2001 From: Tommi Reiman Date: Wed, 1 Aug 2018 19:43:58 +0300 Subject: [PATCH] query is a form-param --- modules/reitit-core/src/reitit/impl.cljc | 4 ++-- test/cljc/reitit/impl_test.cljc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/reitit-core/src/reitit/impl.cljc b/modules/reitit-core/src/reitit/impl.cljc index ccad2761..58fb67e6 100644 --- a/modules/reitit-core/src/reitit/impl.cljc +++ b/modules/reitit-core/src/reitit/impl.cljc @@ -256,9 +256,9 @@ [params] (->> params (map (fn [[k v]] - (str (url-encode (into-string k)) + (str (form-encode (into-string k)) "=" - (url-encode (into-string v))))) + (form-encode (into-string v))))) (str/join "&"))) (defmacro goog-extend [type base-type ctor & methods] diff --git a/test/cljc/reitit/impl_test.cljc b/test/cljc/reitit/impl_test.cljc index 85526eb4..1842d358 100644 --- a/test/cljc/reitit/impl_test.cljc +++ b/test/cljc/reitit/impl_test.cljc @@ -57,7 +57,7 @@ {:a 1} "a=1" {:a nil} "a=" {:a :b :c "d"} "a=b&c=d" - {:a "b c"} "a=b%20c")) + {:a "b c"} "a=b+c")) ; TODO: support seq values? ;{:a ["b" "c"]} "a=b&a=c"