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.
2 parents 7c1b8b5 + 19d6a11 commit 84a7f6fCopy full SHA for 84a7f6f
src/ring/util/codec.clj
@@ -56,7 +56,7 @@
56
(percent-decode encoded "UTF-8"))
57
([^String encoded ^String encoding]
58
(str/replace encoded
59
- #"(?:%[A-Za-z0-9]{2})+"
+ #"(?:%[A-Fa-f0-9]{2})+"
60
(fn [chars]
61
(-> (parse-bytes chars)
62
(String. encoding)
test/ring/util/test/codec.clj
@@ -9,7 +9,7 @@
9
(is (= (percent-encode "foo") "%66%6F%6F")))
10
11
(deftest test-percent-decode
12
- (is (= (percent-decode "%s/") "%s/"))
+ (is (= (percent-decode "%s4/") "%s4/"))
13
(is (= (percent-decode "%20") " "))
14
(is (= (percent-decode "foo%20bar") "foo bar"))
15
(is (= (percent-decode "foo%FE%FF%00%2Fbar" "UTF-16") "foo/bar"))
0 commit comments