We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94a4647 commit 8794399Copy full SHA for 8794399
src/ring/util/codec.clj
@@ -4,7 +4,8 @@
4
(:import java.io.File
5
java.util.Map
6
[java.net URLEncoder URLDecoder]
7
- org.apache.commons.codec.binary.Base64))
+ org.apache.commons.codec.binary.Base64
8
+ org.apache.commons.codec.net.URLCodec))
9
10
(defn assoc-conj
11
"Associate a key with a value in a map. If the key already exists in the map,
@@ -112,7 +113,8 @@
112
113
or UTF-8 by default."
114
[^String encoded & [encoding]]
115
(try
- (URLDecoder/decode encoded (or encoding "UTF-8"))
116
+ (let [codec (URLCodec. (or encoding "UTF-8"))]
117
+ (.decode codec encoded))
118
(catch Exception _ nil)))
119
120
(defn form-decode
0 commit comments