From: Katsumi Yamaoka Date: Mon, 30 Oct 2006 12:11:47 +0000 (+0000) Subject: (html2text-format-tags): Avoid infloop on open tags. X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=commitdiff_plain;h=018d060bb1f62a2441ad592ffcbbce49d2fbeb74 (html2text-format-tags): Avoid infloop on open tags. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3244a9fa2..1d4037a76 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2006-10-30 Katsumi Yamaoka + + * html2text.el (html2text-format-tags): Avoid infloop on open tags. + 2006-10-29 Katsumi Yamaoka * gnus-sum.el (gnus-set-mode-line): Quote % in group name. diff --git a/lisp/html2text.el b/lisp/html2text.el index de9cf6474..05ba8ce96 100644 --- a/lisp/html2text.el +++ b/lisp/html2text.el @@ -456,7 +456,9 @@ See the documentation for that variable." (p3) (p4)) (search-backward "<" (point-min) t) (setq p1 (point)) - (search-forward (format "" tag) (point-max) t) + (unless (search-forward (format "" tag) (point-max) t) + (goto-char p2) + (insert (format "" tag))) (setq p4 (point)) (search-backward "