(www-xml-format-unit): Escape `&'.
authorMORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
Fri, 19 Mar 2010 06:03:44 +0000 (15:03 +0900)
committerMORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
Fri, 19 Mar 2010 06:03:44 +0000 (15:03 +0900)
cwiki-common.el

index f6aa4ad..4a30be9 100644 (file)
   (let (name props children ret)
     (cond
      ((stringp format-unit)
   (let (name props children ret)
     (cond
      ((stringp format-unit)
-      (www-format-encode-string format-unit 'without-tags)
-      ;; (mapconcat (lambda (c)
-      ;;              (cond
-      ;;               ((eq c ?<) "&amp;lt;")
-      ;;               ((eq c ?>) "&amp;gt;")
-      ;;               (t
-      ;;                (char-to-string c))))
-      ;;            format-unit "")
+      (mapconcat (lambda (c)
+                  (cond
+                   ((eq c ?&) "&amp;")
+                    ;; ((eq c ?<) "&amp;lt;")
+                    ;; ((eq c ?>) "&amp;gt;")
+                   (t
+                    (char-to-string c))))
+                (www-format-encode-string format-unit 'without-tags)
+                "")
       )
      ((consp format-unit)
       (setq name (car format-unit)
       )
      ((consp format-unit)
       (setq name (car format-unit)