X-Git-Url: http://gitweb.fperrin.net/?p=atom.el.git;a=blobdiff_plain;f=atom.el;fp=atom.el;h=0a4b61e53318a0d53848c827175b1fba0c08d848;hp=126371a76bfbda2e5bec98214ad9879660c7c612;hb=4abaf233990ca059146a1b4de55a8d0261e730c4;hpb=066828ac7dec2995349288b8e7b19213a916886e diff --git a/atom.el b/atom.el index 126371a..0a4b61e 100644 --- a/atom.el +++ b/atom.el @@ -276,14 +276,17 @@ Atom feed. CONTENT must be a string." (defun atom-string-to-xml (string) "Convert STRING into a Lisp structure as used by `xml.el'." - (with-temp-buffer - (insert "
") - (insert string) - (insert "
") - ;; `xml-parse-region' doesn't require that the XML parsed be enclosed in a - ;; root node, and accordingly, returns a list of elements. We are only - ;; interested in the first one, the DIV we just inserted. - (car (xml-parse-region (point-min) (point-max))))) + (require 'xml-xhtml-entities) + (let ((xml-entity-alist xml-xhtml-entities) + (xml-validating-parser t)) + (with-temp-buffer + (insert "
") + (insert string) + (insert "
") + ;; `xml-parse-region' returns a list of elements, even though it + ;; requires an only root node. We are only interested in the first + ;; one, the DIV we just inserted. + (car (xml-parse-region (point-min) (point-max)))))) (defun atom-massage-xhtml (content) "Massage CONTENT so it can be used as an XHTML fragment in an