From db0b770d2b149bdbab53c66190dd9c57d06ce414 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Thu, 10 Mar 2011 16:54:53 +0100 Subject: Be more lenient regarding non-string and non-list variables. --- formatters.lisp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'formatters.lisp') 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) -- cgit v1.2.3