From: Lars Magne Ingebrigtsen Date: Tue, 7 Sep 2010 00:08:33 +0000 (+0000) Subject: gnus-html.el (gnus-html-wash-tags): Limit end-tag matching to the current line to... X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~48^2~45 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f9e506776ab214e5644ac36b583095fdde8a88da;p=emacs.git gnus-html.el (gnus-html-wash-tags): Limit end-tag matching to the current line to work around bugs in the output from w3m. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 85150a1adbf..509ad305d54 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,5 +1,8 @@ 2010-09-06 Lars Magne Ingebrigtsen + * gnus-html.el (gnus-html-wash-tags): Limit end-tag matching to the + current line to work around bugs in the output from w3m. + * gnus-async.el (gnus-async-article-callback): Always prefetch images for groups that want that. diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el index eaa0e99436e..034d65ef1c2 100644 --- a/lisp/gnus/gnus-html.el +++ b/lisp/gnus/gnus-html.el @@ -117,7 +117,7 @@ fit these criteria." (while (re-search-forward " * * *\n" nil t) (replace-match "" t t)) (goto-char (point-min)) - (while (re-search-forward "]+>" nil t) + (while (re-search-forward "]+>" nil t) (replace-match "" t t)) (goto-char (point-min)) (while (re-search-forward "<\\([^ />]+\\)\\([^>]*\\)>" nil t) @@ -127,7 +127,7 @@ fit these criteria." (when (plusp (length parameters)) (set-text-properties 0 (1- (length parameters)) nil parameters)) (delete-region start (point)) - (when (search-forward (concat "") nil t) + (when (search-forward (concat "") (line-end-position) t) (delete-region (match-beginning 0) (match-end 0))) (setq end (point)) (cond @@ -224,7 +224,7 @@ fit these criteria." (goto-char (point-min)) ;; The output from -halfdump isn't totally regular, so strip ;; off any s that were left over. - (while (re-search-forward "" nil t) + (while (re-search-forward "\\|" nil t) (replace-match "" t t)) (when images (gnus-html-schedule-image-fetching (current-buffer) (nreverse images)))