Changeset 12924 in project for release


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

Merge latest release 4 changes

Location:
release/3/uri-generic/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • release/3/uri-generic/trunk

  • release/3/uri-generic/trunk/tests/run.scm

    r12916 r12924  
    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/3/uri-generic/trunk/uri-generic.scm

    r12916 r12924  
    789789;;  Percent encoding and decoding
    790790
    791 (define (uri-encode-string str #!optional (char-set (char-set-union
    792                                                      (char-set #\%)
    793                                                      char-set:uri-reserved)))
     791(define (uri-encode-string str #!optional (char-set (char-set-complement
     792                                                     char-set:uri-unreserved)))
    794793  (let ((clst (string->list str)))
    795794    (uri-char-list->string
     
    806805
    807806(define (uri-char-list->string s)
    808   (list->string
    809    (reverse
    810     (fold (lambda (x ax)
    811                   (cond ((char? x) (cons x ax))
    812                         ((list? x) (append (reverse x) ax)))) (list) s))))
     807  (reverse-list->string
     808   (fold (lambda (x ax)
     809           (cond ((char? x) (cons x ax))
     810                 ((list? x) (append-reverse x ax)))) (list) s)))
    813811   
    814812;; Convert a string to a URI character list
Note: See TracChangeset for help on using the changeset viewer.