1 # contributor: Xah Lee (XahLee.org)
2 # name: find and replace on region
5 (defun replace-html-chars-region (start end)
6 "Replace “<” to “<” and other chars in HTML.
7 This works on the current region."
10 (narrow-to-region start end)
11 (goto-char (point-min))
12 (while (search-forward "&" nil t) (replace-match "&" nil t))
13 (goto-char (point-min))
14 (while (search-forward "<" nil t) (replace-match "<" nil t))
15 (goto-char (point-min))
16 (while (search-forward ">" nil t) (replace-match ">" nil t))