diff --git a/lib/chibi/sxml.scm b/lib/chibi/sxml.scm index b199f282..6dc49cf9 100644 --- a/lib/chibi/sxml.scm +++ b/lib/chibi/sxml.scm @@ -52,10 +52,11 @@ (apply string-append (reverse (cons ">" res))) (lp (cdr ls) (cons (html-attr->string (car ls)) (cons " " res)))))) -(define (html-display-escaped-string str . o) - (let ((start 0) - (end (string-length str)) - (out (if (pair? o) (car o) (current-output-port)))) +(define (html-display-escaped-string x . o) + (let* ((str (display-to-string x)) + (start 0) + (end (string-length str)) + (out (if (pair? o) (car o) (current-output-port)))) (let lp ((from start) (to start)) (if (>= to end) (display (substring str from to) out)