From 9019dd53357a12a3edce5e3d0dab529802584e04 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 29 Sep 2002 23:54:22 +0000 Subject: [PATCH] Fixje --- scm/to-xml.scm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scm/to-xml.scm b/scm/to-xml.scm index 76d78585d3..fc65e9d847 100644 --- a/scm/to-xml.scm +++ b/scm/to-xml.scm @@ -105,6 +105,13 @@ is then separated. (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))) @@ -122,11 +129,7 @@ is then separated. "=\"" (let ((s (call-with-output-string (lambda (port) (display val port))))) - (re-sub-alist s '(("\"" . """) - ("<" . "<") - (">" . ">") - ("'" . "'") - ("&" . "&")))) + (re-sub-alist s xml-entities-alist)) "\"" ))) -- 2.39.5