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

Re: w3m-detect-meta-charset considering html comments



In [emacs-w3m:12828]
On Fri, 01 Dec 2017 13:28:27 -0200, Renato Ferreira wrote:
> Debugging a coding issue on a page i found that following:

> On (w3m-decode-buffer) when there is no content-charset defined by
> headers, it calls (w3m-detect-meta-charset). But that ends up detecting
> commented meta tags such as :
> <!--<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />-->

> Setting the wrong charset on the content.

> I corrected the issue through:
> (advice-add #'w3m-detect-meta-charset :before #'w3m-remove-comments)

> Please add (w3m-remove-comments) where you see most properly (such as
> w3m-detect-meta-charset or w3m-decode-buffer).

I've installed a fix in CVS.  Thank you for pointing it out.