]> git.eshelyaron.com Git - emacs.git/commitdiff
(mh-x-image-url-cache-canonicalize): Use url-hexify-string to remove
authorBill Wohler <wohler@newt.com>
Wed, 11 Jan 2006 09:01:22 +0000 (09:01 +0000)
committerBill Wohler <wohler@newt.com>
Wed, 11 Jan 2006 09:01:22 +0000 (09:01 +0000)
special characters from filenames (closes SF #1396499).

lisp/mh-e/ChangeLog
lisp/mh-e/mh-utils.el

index e5e62c0c3827f9b8343462355d25a81fdd096e69..b556462dd41e4fe1d22fe55dc124661a52efabe0 100644 (file)
@@ -1,7 +1,16 @@
+2006-01-11  Bill Wohler  <wohler@newt.com>
+
+       * mh-utils.el (mh-x-image-url-cache-canonicalize): Use
+       url-hexify-string to remove special characters from filenames
+       (closes SF #1396499). Note that this invalidates the existing
+       names in your cache so you might as well remove
+       ~/Mail/.mhe-x-image-cache/* now.
+       
 2006-01-10  Bill Wohler  <wohler@newt.com>
 
        * mh-comp.el (mh-insert-letter): If you choose a different folder,
-       the cur message is used (closes SF #1205890).
+       the cur message is used. Sync docstring with manual (closes SF
+       #1205890).
 
        * mh-mime.el (mh-compose-forward): Use standard range argument
        instead of messages. Use more powerful mh-read-range instead of
index b600a4327351bee0942e9cccf13f1299bfc84de6..d9bb6dda979cbf4b3752e0f59bdcdb0ec2131d72 100644 (file)
@@ -1489,12 +1489,16 @@ path is generated."
 
 (defun mh-x-image-url-cache-canonicalize (url)
   "Canonicalize URL.
-Replace the ?/ character with a ?! character and append .png."
-   (format "%s/%s.png" mh-x-image-cache-directory
+Replace the ?/ character with a ?! character and append .png.
+Also replaces special characters with `url-hexify-string' since
+not all characters, such as :, are legal within Windows
+filenames. See URL `http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/naming_a_file.asp'."
+  (format "%s/%s.png" mh-x-image-cache-directory
+          (url-hexify-string
            (with-temp-buffer
              (insert url)
              (mh-replace-string "/" "!")
-             (buffer-string))))
+             (buffer-string)))))
 
 (defun mh-x-image-set-download-state (file data)
   "Setup a symbolic link from FILE to DATA."