Changeset 12923 in project


Ignore:
Timestamp:
12/30/08 16:39:27 (13 years ago)
Author:
sjamaan
Message:

Fix uri-encode-string to have a better default charset

Location:
release/4/uri-generic/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/uri-generic/trunk/tests/run.scm

    r12915 r12923  
    180180  '(("foo?bar" "foo%3Fbar")
    181181    ("foo&bar" "foo%26bar")
    182     ("foo%20bar" "foo%2520bar")))
     182    ("foo%20bar" "foo%2520bar")
     183    ("foo\x00bar\n" "foo%00bar%0A")))
    183184
    184185(test-group "uri-encode-string test"
  • release/4/uri-generic/trunk/uri-generic.scm

    r12917 r12923  
    778778;;  Percent encoding and decoding
    779779
    780 (define (uri-encode-string str #!optional (char-set (char-set-union
    781                                                      (char-set #\%)
    782                                                      char-set:uri-reserved)))
     780(define (uri-encode-string str #!optional (char-set (char-set-complement
     781                                                     char-set:uri-unreserved)))
    783782  (let ((clst (string->list str)))
    784783    (uri-char-list->string
Note: See TracChangeset for help on using the changeset viewer.