1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-19 03:00:25 +02:00

Fix uri-decode behavior for "+"

* module/web/uri.scm (uri-decode): Add #:decode-plus-to-space? keyword
  argument.
  (split-and-decode-uri-path): Don't decode plus to space.
* doc/ref/web.texi (URIs): Update documentation.
* test-suite/tests/web-uri.test ("decode"): Add tests.
* NEWS: Add entry.

Based on a patch by Brent <brent@tomski.co.za>.
This commit is contained in:
Andy Wingo 2016-06-20 14:34:19 +02:00
parent 05b3e0608e
commit 0a3ea0586d
4 changed files with 25 additions and 5 deletions

View file

@ -255,7 +255,10 @@
(equal? "foo bar" (uri-decode "foo%20bar")))
(pass-if "foo+bar"
(equal? "foo bar" (uri-decode "foo+bar"))))
(equal? "foo bar" (uri-decode "foo+bar")))
(pass-if "foo+bar"
(equal? '("foo+bar") (split-and-decode-uri-path "foo+bar"))))
(with-test-prefix "encode"
(pass-if (equal? "foo%20bar" (uri-encode "foo bar")))