* mm-decode.el (mm-inline-text-html-with-images): Doc fix.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 24 Jul 2002 06:45:19 +0000 (06:45 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 24 Jul 2002 06:45:19 +0000 (06:45 +0000)
(mm-w3m-safe-url-regexp): New user option.

* mm-view.el (mm-inline-text-html-render-with-w3m): Use
`mm-w3m-safe-url-regexp' to bind `w3m-safe-url-regexp'.

lisp/ChangeLog
lisp/mm-decode.el
lisp/mm-view.el

index 008e924..50cb2d4 100644 (file)
@@ -1,3 +1,11 @@
+2002-07-24  Katsumi Yamaoka <yamaoka@jpl.org>
+
+       * mm-decode.el (mm-inline-text-html-with-images): Doc fix.
+       (mm-w3m-safe-url-regexp): New user option.
+
+       * mm-view.el (mm-inline-text-html-render-with-w3m): Use
+       `mm-w3m-safe-url-regexp' to bind `w3m-safe-url-regexp'.
+
 2002-07-23  Karl Kleinpaste  <karl@charcoal.com>
 
        * gnus-sum.el (gnus-summary-delete-article): Force
@@ -9,7 +17,7 @@
 
        * nnmail.el (nnmail-fancy-expiry-target): Treat nonexisting
        headers as empty headers.
-       
+
 2002-07-21  Kai Gro\e,b_\e(Bjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
        From Jochen Hein <jochen@jochen.org>.
 
        spams.
        (gnus-newsgroup-spam-marked): New variable.
        (gnus-summary-local-variables): Add gnus-newsgroup-spam-marked.
-       (gnus-article-read-p, gnus-article-mark) 
-       (gnus-set-global-variables, gnus-set-global-variables) 
-       (gnus-article-marked-p, gnus-summary-mark-article-as-read) 
-       (gnus-summary-mark-article-as-unread) 
-       (gnus-summary-mark-article-as-unread, gnus-summary-mark-article) 
-       (gnus-mark-article-as-read, gnus-mark-article-as-unread) 
+       (gnus-article-read-p, gnus-article-mark)
+       (gnus-set-global-variables, gnus-set-global-variables)
+       (gnus-article-marked-p, gnus-summary-mark-article-as-read)
+       (gnus-summary-mark-article-as-unread)
+       (gnus-summary-mark-article-as-unread, gnus-summary-mark-article)
+       (gnus-mark-article-as-read, gnus-mark-article-as-unread)
        (gnus-mark-article-as-unread, gnus-summary-catchup): Grok spam.
 
 2002-07-10  Simon Josefsson  <jas@extundo.com>
@@ -70,7 +78,7 @@
        * gnus-topic.el (gnus-topic-indent, gnus-topic-unindent): Change
        cdaar to cdar and car.
 
-       * nnsoup.el (nnsoup-retrieve-headers, nnsoup-request-type) 
+       * nnsoup.el (nnsoup-retrieve-headers, nnsoup-request-type)
        (nnsoup-read-active-file, nnsoup-article-to-area): Ditto.
 
 2002-07-05  Katsumi Yamaoka <yamaoka@jpl.org>
index 64d935b..b38ac3b 100644 (file)
@@ -127,14 +127,23 @@ It is suggested to customize `mm-text-html-renderer' instead.")
 
 (defcustom mm-inline-text-html-with-images nil
   "If non-nil, Gnus will allow retrieving images in the HTML contents
-with <img> tags.  It has no effect on Emacs/w3.  For emacs-w3m, the
-value of the option `w3m-display-inline-images' will be bound with
-this value.  In addition, the variable `w3m-safe-url-regexp' will be
-bound with the value nil if it is non-nil to make emacs-w3m show all
-images, however this behavior may be changed in the future."
+with <img> tags.  It has no effect on Emacs/w3.  See also
+the documentation for the option `mm-w3m-safe-url-regexp'."
   :type 'boolean
   :group 'mime-display)
 
+(defcustom mm-w3m-safe-url-regexp "\\`cid:"
+  "Regexp that matches safe url names.  Some HTML mails might have a
+trick of spammers using <img> tags.  It is likely to be intended to
+verify whether you have read the mail.  You can prevent your personal
+informations from leaking by setting this to the regexp which matches
+the safe url names.  The value of the variable `w3m-safe-url-regexp'
+will be bound with this value.  You may set this value to nil if you
+consider all the urls to be safe."
+  :type '(choice (regexp :tag "Regexp")
+                (const :tag "All URLs are safe" nil)
+  :group 'mime-display))
+
 (defcustom mm-inline-text-html-with-w3m-keymap t
   "If non-nil, use emacs-w3m command keys in the article buffer."
   :type 'boolean
@@ -681,9 +690,9 @@ external if displayed external."
          ;; We create a private sub-directory where we store our files.
          (set-file-modes dir 448)
          (if filename
-             (setq file (expand-file-name 
+             (setq file (expand-file-name
                          (gnus-map-function mm-file-name-rewrite-functions
-                                             (file-name-nondirectory filename))
+                                            (file-name-nondirectory filename))
                          dir))
            (setq file (mm-make-temp-file (expand-file-name "mm." dir))))
          (let ((coding-system-for-write mm-binary-coding-system))
index 7bf1cb1..6a04a8f 100644 (file)
@@ -281,9 +281,7 @@ will not be substituted.")
        (when charset
          (delete-region (point-min) (point-max))
          (insert (mm-decode-string text charset)))
-       (let ((w3m-safe-url-regexp (if mm-inline-text-html-with-images
-                                      nil
-                                    "\\`cid:"))
+       (let ((w3m-safe-url-regexp mm-w3m-safe-url-regexp)
              (w3m-display-inline-images mm-inline-text-html-with-images)
              w3m-force-redisplay)
          (w3m-region (point-min) (point-max)))