X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/8b990b89011d5b954c794e08549776b15e34fff1..207f11935755236b21ca4d3fe6b19206e0a9ed33:/lisp/gnus/gnus-art.el diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 5de4b5829c..5ec1268aee 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -50,6 +50,7 @@ (autoload 'ansi-color-apply-on-region "ansi-color") (autoload 'mm-url-insert-file-contents-external "mm-url") (autoload 'mm-extern-cache-contents "mm-extern") +(autoload 'url-expand-file-name "url-expand") (defgroup gnus-article nil "Article display." @@ -2792,10 +2793,9 @@ summary buffer." (setq gnus-article-browse-html-temp-list nil)) gnus-article-browse-html-temp-list) -(defun gnus-article-browse-html-save-cid-content (cid handles directory abs) +(defun gnus-article-browse-html-save-cid-content (cid handles directory) "Find CID content in HANDLES and save it in a file in DIRECTORY. -Return absolute file name if ABS is non-nil, otherwise relative to -the parent of DIRECTORY." +Return file name relative to the parent of DIRECTORY." (save-match-data (let (file afile) (catch 'found @@ -2807,7 +2807,7 @@ the parent of DIRECTORY." ((not (or (bufferp (car handle)) (stringp (car handle))))) ((equal (mm-handle-media-supertype handle) "multipart") (when (setq file (gnus-article-browse-html-save-cid-content - cid handle directory abs)) + cid handle directory)) (throw 'found file))) ((equal (concat "<" cid ">") (mm-handle-id handle)) (setq file (or (mm-handle-filename handle) @@ -2817,11 +2817,9 @@ the parent of DIRECTORY." mailcap-mime-extensions)))) afile (expand-file-name file directory)) (mm-save-part-to-file handle afile) - (throw 'found (if abs - afile - (concat (file-name-nondirectory - (directory-file-name directory)) - "/" file)))))))))) + (throw 'found (concat (file-name-nondirectory + (directory-file-name directory)) + "/" file))))))))) (defun gnus-article-browse-html-parts (list &optional header) "View all \"text/html\" parts from LIST. @@ -2857,13 +2855,32 @@ message header will be added to the bodies of the \"text/html\" parts." (insert content) ;; resolve cid contents (let ((case-fold-search t) - abs st cid-file) + st base regexp cid-file) (goto-char (point-min)) - (when (re-search-forward "
]" nil t) - (setq st (match-end 0) - abs (or - (not (re-search-forward "]" nil t)) - (re-search-backward "