http://www.ietf.org/rfc/rfc2396.txt
Adds to *excluded-characters*, with a test
;; Parsing
(defparameter *excluded-characters*
- '(;; `delims' (except #\%, because it's handled specially):
+ (append
+ (loop for i from 0 to #x1f
+ collect (code-char i))
+ '(;; `delims' (except #\%, because it's handled specially):
#\< #\> #\" #\space #\#
+
;; `unwise':
- #\{ #\} #\| #\\ #\^ #\[ #\] #\`))
+ #\{ #\} #\| #\\ #\^ #\[ #\] #\`)))
(defun reserved-char-vector (chars &key except)
(do* ((a (make-array 127 :element-type 'bit :initial-element 0))
:condition-type 'uri-parse-error)
res)
+
+ ;;an escaped newline isn't rendered properly
+ (push
+ `(let ((weird-uri "https://example.com/q?foo%0abar%20baz"))
+ (test
+ weird-uri
+ (puri:render-uri (puri:parse-uri weird-uri) nil)
+ :test #'string=)
+ ) res)
+
`(progn ,@(nreverse res))))
(defun do-tests ()