Function: url-insert-entities-in-string
url-insert-entities-in-string is an autoloaded and byte-compiled
function defined in url-util.el.gz.
Signature
(url-insert-entities-in-string STRING)
Documentation
Convert HTML markup-start characters to entity references in STRING.
Also replaces the " character, so that the result may be safely used as
an attribute value in a tag. Returns a new string with the result of the
conversion. Replaces these characters as follows:
& ==> &
< ==> <
> ==> >
" ==> "
Source Code
;; Defined in /usr/src/emacs/lisp/url/url-util.el.gz
;;;###autoload
(defun url-insert-entities-in-string (string)
"Convert HTML markup-start characters to entity references in STRING.
Also replaces the \" character, so that the result may be safely used as
an attribute value in a tag. Returns a new string with the result of the
conversion. Replaces these characters as follows:
& ==> &
< ==> <
> ==> >
\" ==> ""
(replace-regexp-in-string "[&<>\"]"
(lambda (c) (cdr (assq (aref c 0)
'((?\" . """)
(?& . "&")
(?< . "<")
(?> . ">")))))
string))