diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2011-03-10 16:54:53 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2011-03-10 16:54:53 +0100 |
commit | db0b770d2b149bdbab53c66190dd9c57d06ce414 (patch) | |
tree | 13496c448188cd365ac7107cfac7f5d9407e1c8e /formatters.lisp | |
parent | 3505099eef1e8eb264f25e740c6ee22a4f28c7c7 (diff) |
Be more lenient regarding non-string and non-list variables.
Diffstat (limited to 'formatters.lisp')
-rw-r--r-- | formatters.lisp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/formatters.lisp b/formatters.lisp index a3a2129..e5bf333 100644 --- a/formatters.lisp +++ b/formatters.lisp @@ -22,6 +22,8 @@ (let* ((escapees (mapcar #'car replacements)) (escapee-p (lambda (x) (member x escapees :test #'char=)))) (lambda (string) + (unless (stringp string) + (setq string (format nil "~A" string))) (with-output-to-string (out) (loop with position = 0 for escapee-pos = (position-if escapee-p string :start position) @@ -35,6 +37,8 @@ (defun escape-for-uri (string) + (unless (stringp string) + (setq string (format nil "~A" string))) (with-output-to-string (out) (map 'list (lambda (char) |