summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2010-09-07 00:08:33 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2010-09-07 00:08:33 +0000
commitf9e506776ab214e5644ac36b583095fdde8a88da (patch)
treeb348095a4216fa93d2b8ead657f3f29a231da3e6 /lisp
parent8d40858522a02df140b790b066b8d16b2df11e24 (diff)
downloademacs-f9e506776ab214e5644ac36b583095fdde8a88da.tar.gz
emacs-f9e506776ab214e5644ac36b583095fdde8a88da.tar.bz2
emacs-f9e506776ab214e5644ac36b583095fdde8a88da.zip
gnus-html.el (gnus-html-wash-tags): Limit end-tag matching to the current line to work around bugs in the output from w3m.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/ChangeLog3
-rw-r--r--lisp/gnus/gnus-html.el6
2 files changed, 6 insertions, 3 deletions
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 <larsi@gnus.org>
+ * 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 " *<pre_int> *</pre_int> *\n" nil t)
(replace-match "" t t))
(goto-char (point-min))
- (while (re-search-forward "<a name[^>]+>" nil t)
+ (while (re-search-forward "<a name[^\n>]+>" 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 "</" tag ">") nil t)
+ (when (search-forward (concat "</" tag ">") (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 </pre_int>s that were left over.
- (while (re-search-forward "</pre_int>" nil t)
+ (while (re-search-forward "</pre_int>\\|</internal>" nil t)
(replace-match "" t t))
(when images
(gnus-html-schedule-image-fetching (current-buffer) (nreverse images)))