Skip to content

Commit cc548a6

Browse files
authored
Escape entities with xml-escape-string
This might not cover all cases, but if it does, it closes upgradingdave#1
1 parent d6ebf34 commit cc548a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xml-to-string.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
(defun xml-to-string-parse-child-node (child-node)
6868
"Convert `node | string' to string representation"
6969
(if (stringp child-node)
70-
child-node
70+
(xml-escape-string child-node)
7171
(xml-to-string-parse-node child-node)))
7272

7373
(defun xml-to-string-parse-qname (node)
@@ -79,7 +79,7 @@
7979
string like \"qname=value qname=value\" ..."
8080
(mapconcat (lambda (elem) (concat (symbol-name (car elem))
8181
"="
82-
"\"" (cdr elem) "\"")) attr-list " "))
82+
"\"" (xml-escape-string (cdr elem)) "\"")) attr-list " "))
8383

8484

8585
(provide 'xml-to-string)

0 commit comments

Comments
 (0)