]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fixje
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 29 Sep 2002 23:54:22 +0000 (23:54 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 29 Sep 2002 23:54:22 +0000 (23:54 +0000)
scm/to-xml.scm

index 76d78585d39c2b22fca2f1696d80cd0c9bd6d39a..fc65e9d8478853e6b7dba632ea860e8fe3f8ae12 100644 (file)
@@ -105,6 +105,13 @@ is then separated.
              (re-sub-alist string (cdr alist))
              string)))
 
+(define xml-entities-alist
+  '(("\"" . "&quot;")
+    ("<" . "&lt;")
+    (">" . "&gt;")
+    ("'" . "&apos;")
+    ("&" . "&amp;")))
+
 (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 '(("\"" . "&quot;")
-                       ("<" . "&lt;")
-                       (">" . "&gt;")
-                       ("'" . "&apos;")
-                       ("&" . "&amp;"))))
+      (re-sub-alist s xml-entities-alist))
     
     "\""
     )))