X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-html.el;h=8571fdbe9112f9302922c012fd7b7f73ee38a7a7;hb=927cc9daf685365b19b5757522b6b4154b5d2d1f;hp=d30b574b55e510bca867ae25694299698bc37cd3;hpb=cd9925289f383ee0caa4ba169bf7b4bf02941f50;p=gnus diff --git a/lisp/gnus-html.el b/lisp/gnus-html.el index d30b574b5..8571fdbe9 100644 --- a/lisp/gnus-html.el +++ b/lisp/gnus-html.el @@ -57,12 +57,6 @@ :group 'gnus-art :type 'integer) -(defcustom gnus-blocked-images "." - "Images that have URLs matching this regexp will be blocked." - :version "24.1" - :group 'gnus-art - :type 'regexp) - (defcustom gnus-max-image-proportion 0.9 "How big pictures displayed are in relation to the window they're in. A value of 0.7 means that they are allowed to take up 70% of the @@ -211,8 +205,8 @@ CHARS is a regexp-like character alternative (e.g., \"[)$]\")." url (if (buffer-live-p gnus-summary-buffer) (with-current-buffer gnus-summary-buffer - gnus-blocked-images) - gnus-blocked-images)) + (gnus-blocked-images)) + (gnus-blocked-images))) (progn (widget-convert-button 'link start end @@ -367,11 +361,12 @@ Use ALT-TEXT for the image string." 'gnus-html-image-fetched (list buffer image)))) (when (> (length (if (featurep 'xemacs) - (split-string (function-arglist 'url-retrieve)) + (cdr (split-string (function-arglist 'url-retrieve))) (help-function-arglist 'url-retrieve))) 4) (setq args (nconc args (list t)))) - (apply #'url-retrieve args))) + (ignore-errors + (apply #'url-retrieve args)))) (defun gnus-html-image-fetched (status buffer image) "Callback function called when image has been fetched." @@ -496,10 +491,11 @@ This only works if the article in question is HTML." (defun gnus-html-prefetch-images (summary) (when (buffer-live-p summary) (let ((blocked-images (with-current-buffer summary - gnus-blocked-images))) + (gnus-blocked-images)))) (save-match-data - (while (re-search-forward "]+src=[\"']\\([^\"']+\\)" nil t) - (let ((url (gnus-html-encode-url (match-string 1)))) + (while (re-search-forward "]+src=[\"']\\(http[^\"']+\\)" nil t) + (let ((url (gnus-html-encode-url + (mm-url-decode-entities-string (match-string 1))))) (unless (gnus-html-image-url-blocked-p url blocked-images) (when (gnus-html-cache-expired url gnus-html-image-cache-ttl) (gnus-html-schedule-image-fetching nil