(re-sub-alist string (cdr alist))
string)))
+(define xml-entities-alist
+ '(("\"" . """)
+ ("<" . "<")
+ (">" . ">")
+ ("'" . "'")
+ ("&" . "&")))
+
(define (open-tag tag attrs exceptions)
(define (candidate? x)
(not (memq (car x) exceptions)))
"=\""
(let ((s (call-with-output-string (lambda (port) (display val port)))))
- (re-sub-alist s '(("\"" . """)
- ("<" . "<")
- (">" . ">")
- ("'" . "'")
- ("&" . "&"))))
+ (re-sub-alist s xml-entities-alist))
"\""
)))