Function: xml-substitute-numeric-entities
xml-substitute-numeric-entities is a byte-compiled function defined in
xml.el.gz.
Signature
(xml-substitute-numeric-entities STRING)
Documentation
Substitute SGML numeric entities by their respective utf characters.
This function replaces numeric entities in the input STRING and returns the modified string. For example "*" gets replaced by "*".
Source Code
;; Defined in /usr/src/emacs/lisp/xml.el.gz
(defun xml-substitute-numeric-entities (string)
"Substitute SGML numeric entities by their respective utf characters.
This function replaces numeric entities in the input STRING and
returns the modified string. For example \"*\" gets replaced
by \"*\"."
(if (and string (stringp string))
(let ((start 0))
(while (string-match "&#\\([0-9]+\\);" string start)
(ignore-errors
(setq string (replace-match
(string (read (substring string
(match-beginning 1)
(match-end 1))))
nil nil string)))
(setq start (1+ (match-beginning 0))))
string)
nil))