diff options
| author | Lars Magne Ingebrigtsen | 2010-09-07 00:08:33 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2010-09-07 00:08:33 +0000 |
| commit | f9e506776ab214e5644ac36b583095fdde8a88da (patch) | |
| tree | b348095a4216fa93d2b8ead657f3f29a231da3e6 | |
| parent | 8d40858522a02df140b790b066b8d16b2df11e24 (diff) | |
| download | emacs-f9e506776ab214e5644ac36b583095fdde8a88da.tar.gz 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.
| -rw-r--r-- | lisp/gnus/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/gnus/gnus-html.el | 6 |
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 @@ | |||
| 1 | 2010-09-06 Lars Magne Ingebrigtsen <larsi@gnus.org> | 1 | 2010-09-06 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 2 | ||
| 3 | * gnus-html.el (gnus-html-wash-tags): Limit end-tag matching to the | ||
| 4 | current line to work around bugs in the output from w3m. | ||
| 5 | |||
| 3 | * gnus-async.el (gnus-async-article-callback): Always prefetch images | 6 | * gnus-async.el (gnus-async-article-callback): Always prefetch images |
| 4 | for groups that want that. | 7 | for groups that want that. |
| 5 | 8 | ||
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." | |||
| 117 | (while (re-search-forward " *<pre_int> *</pre_int> *\n" nil t) | 117 | (while (re-search-forward " *<pre_int> *</pre_int> *\n" nil t) |
| 118 | (replace-match "" t t)) | 118 | (replace-match "" t t)) |
| 119 | (goto-char (point-min)) | 119 | (goto-char (point-min)) |
| 120 | (while (re-search-forward "<a name[^>]+>" nil t) | 120 | (while (re-search-forward "<a name[^\n>]+>" nil t) |
| 121 | (replace-match "" t t)) | 121 | (replace-match "" t t)) |
| 122 | (goto-char (point-min)) | 122 | (goto-char (point-min)) |
| 123 | (while (re-search-forward "<\\([^ />]+\\)\\([^>]*\\)>" nil t) | 123 | (while (re-search-forward "<\\([^ />]+\\)\\([^>]*\\)>" nil t) |
| @@ -127,7 +127,7 @@ fit these criteria." | |||
| 127 | (when (plusp (length parameters)) | 127 | (when (plusp (length parameters)) |
| 128 | (set-text-properties 0 (1- (length parameters)) nil parameters)) | 128 | (set-text-properties 0 (1- (length parameters)) nil parameters)) |
| 129 | (delete-region start (point)) | 129 | (delete-region start (point)) |
| 130 | (when (search-forward (concat "</" tag ">") nil t) | 130 | (when (search-forward (concat "</" tag ">") (line-end-position) t) |
| 131 | (delete-region (match-beginning 0) (match-end 0))) | 131 | (delete-region (match-beginning 0) (match-end 0))) |
| 132 | (setq end (point)) | 132 | (setq end (point)) |
| 133 | (cond | 133 | (cond |
| @@ -224,7 +224,7 @@ fit these criteria." | |||
| 224 | (goto-char (point-min)) | 224 | (goto-char (point-min)) |
| 225 | ;; The output from -halfdump isn't totally regular, so strip | 225 | ;; The output from -halfdump isn't totally regular, so strip |
| 226 | ;; off any </pre_int>s that were left over. | 226 | ;; off any </pre_int>s that were left over. |
| 227 | (while (re-search-forward "</pre_int>" nil t) | 227 | (while (re-search-forward "</pre_int>\\|</internal>" nil t) |
| 228 | (replace-match "" t t)) | 228 | (replace-match "" t t)) |
| 229 | (when images | 229 | (when images |
| 230 | (gnus-html-schedule-image-fetching (current-buffer) (nreverse images))) | 230 | (gnus-html-schedule-image-fetching (current-buffer) (nreverse images))) |