Prevent error that character not found.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sun, 24 Sep 2017 09:23:32 +0300
changeset 1539 14739033d89f
parent 1538 35dbe903d7e0
child 1540 e3000459f683
Prevent error that character not found.
.emacs-my
--- a/.emacs-my	Thu Sep 21 19:50:19 2017 +0300
+++ b/.emacs-my	Sun Sep 24 09:23:32 2017 +0300
@@ -3333,11 +3333,11 @@
     (save-restriction
       (narrow-to-region start end)
       (goto-char (point-min))
-      (while (search-forward "&") (replace-match "&amp;"))
+      (while (search-forward "&" nil t) (replace-match "&amp;"))
       (goto-char (point-min))
-      (while (search-forward "<") (replace-match "&lt;"))
+      (while (search-forward "<" nil t) (replace-match "&lt;"))
       (goto-char (point-min))
-      (while (search-forward ">") (replace-match "&gt;"))
+      (while (search-forward ">" nil t) (replace-match "&gt;"))
       )))
 
 (defun my-html-charref-from-char (char)