>>>> "Stephen" == Stephen J Turnbull
<stephen(a)xemacs.org> writes:
Stephen> PSGML probably has an `html-unquote' function or
Stephen> something like that.
Last I looked I could not find one. So, I wrote:
;; Define the reverse of html-quote-region.
(defun html-unquote-region (begin end)
"Reverses html-quote-region. \"UnQuote\" any characters in the
region that have special HTML meanings. This converts HTML escapes
for <'s, >'s, and &'s back into their literal representation."
(interactive "r")
(save-excursion
(goto-char begin)
(while (search-forward "&" end t)
(forward-char -5)
(delete-char 5)
(insert "&")
(setq end (- end 4)))
(goto-char begin)
(while (search-forward "<" end t)
(forward-char -4)
(delete-char 4)
(insert "<")
(setq end (- end 3)))
(goto-char begin)
(while (search-forward ">" end t)
(forward-char -4)
(delete-char 4)
(insert ">")
(setq end (- end 3)))))
Gleb