[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: small fix



Hi,

Please let me know the URL having such an image type.  The
following patch may fix the problem, but I cannot test it. :)

--- w3m.el~	2003-05-27 02:14:12 +0000
+++ w3m.el	2003-06-12 01:16:35 +0000
@@ -3400,7 +3400,7 @@
 			type (w3m-remove-redundant-spaces
 			      (substring type 0 (match-beginning 0))))
 		(setq type (w3m-remove-redundant-spaces type))
-		(when (string-match ";\\'" type)
+		(when (string-match ";" type)
 		  (setq type (substring type 0 (match-beginning 0)))))
 	      (setq type (downcase type)))
 	    (when moved

>>>>> In [emacs-w3m : No.05105]
>>>>>	Max Froumentin <mf@w3.org> wrote:

> [GNUemacs21, w3m.el 1.795]

> Hi,

> I've just started using emacs-w3m, and I'm impressed by the great
> work. And I haven't even started looking at antenna or shimbun, or at
> integrating it in gnus, yet.

Thank you for using emacs-w3m.  That encourages us, the
emacs-w3m team.

> However I have found a small problem when displaying images.
> When the http content-type has the q parameter ("image/png; q=0.8"),
> w3m-image-type doesn't match it against "image/png" and so doesn't
> display the image. A fix is apparently easy, trim the string:

> (defun w3m-image-type (content-type)
>   "Return image type which corresponds to CONTENT-TYPE."
>   (cdr (assoc (car (split-string content-type ";")) w3m-image-type-alist))
> )

> It seems to do the trick for me.

Me too. ;-)
-- 
Katsumi Yamaoka <yamaoka@jpl.org>