repair for uri-decode
Certain inputs could cause `uri-decode` to go into a loop. Patch and supplied by Doug Williams. Closes PR 14010
This commit is contained in:
parent
62774bf3c7
commit
24fc16674b
|
@ -9,6 +9,15 @@
|
|||
(uri-decode "%P") => "%P"
|
||||
(uri-decode "λ") => "λ"
|
||||
|
||||
(uri-decode (string-append
|
||||
"\u631\u633\u627\u646\u647\u200c\u647\u627\u6cc\u2d\u62e\u648\u62f"
|
||||
"\u645\u627\u646\u6cc\u2f\u62d\u642\u648\u642\u2d\u628\u634\u631\u2d"
|
||||
"\u645\u6cc\u62f\u6cc\u627\u2f\u31\u32\u35\u34\u36\u2d"))
|
||||
=> (string-append
|
||||
"\u631\u633\u627\u646\u647\u200c\u647\u627\u6cc\u2d\u62e\u648\u62f"
|
||||
"\u645\u627\u646\u6cc\u2f\u62d\u642\u648\u642\u2d\u628\u634\u631\u2d"
|
||||
"\u645\u6cc\u62f\u6cc\u627\u2f\u31\u32\u35\u34\u36\u2d")
|
||||
|
||||
(alist->form-urlencoded '([a . "hel+lo \u7238"]))
|
||||
=> "a=hel%2Blo+%E7%88%B8"
|
||||
(form-urlencoded->alist
|
||||
|
|
|
@ -184,7 +184,7 @@ See more in PR8831.
|
|||
;; and not properly encoded -- similar justification to
|
||||
;; browsers accepting unencoded chars in manually entered URLs.
|
||||
[else (append (bytes->list (string->bytes/utf-8 (string c)))
|
||||
(internal-decode l))]))))
|
||||
rest)]))))
|
||||
(bytes->string/utf-8 (apply bytes (internal-decode (string->list str)))))
|
||||
|
||||
;; Utility for defining codecs
|
||||
|
|
Loading…
Reference in New Issue
Block a user