# HG changeset patch # User Bill Wohler # Date 1163485843 0 # Node ID 2443b8a6f498b6f4ff04ad5eba9e67101d7b9d5c # Parent 5783c1198e3b663e13d802a3535f6bb0e4342d61 (mh-x-image-url-cache-canonicalize): Add `*' to reserved Windows filename characters (closes SF #1396499). diff -r 5783c1198e3b -r 2443b8a6f498 lisp/mh-e/mh-xface.el --- a/lisp/mh-e/mh-xface.el Mon Nov 13 22:05:06 2006 +0000 +++ b/lisp/mh-e/mh-xface.el Tue Nov 14 06:30:43 2006 +0000 @@ -361,14 +361,16 @@ Replace the ?/ character with a ?! character and append .png. Also replaces special characters with `mh-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'." +filenames. In addition, replaces * with %2a. See URL +`http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/ifaces/iitemnamelimits/GetValidCharacters.asp'." (format "%s/%s.png" mh-x-image-cache-directory - (mh-url-hexify-string - (with-temp-buffer - (insert url) - (mh-replace-string "/" "!") - (buffer-string))))) + (mh-replace-regexp-in-string + "\*" "%2a" + (mh-url-hexify-string + (with-temp-buffer + (insert url) + (mh-replace-string "/" "!") + (buffer-string)))))) (defun mh-x-image-get-download-state (file) "Check the state of FILE by following any symbolic links."