[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug#582677: w3m-el-snapshot: w3m-cookie-reject-domains doesn't work
- From: Katsumi Yamaoka <yamaoka@xxxxxxx>
- Date: Mon, 24 May 2010 10:09:30 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 11221
- References: <87bpc7gapd.fsf@xxxxxxxxxxxxxxxx> <20100523.150410.116909159.tats%nobody@xxxxxxxxxxxxxxx>
>>>>> Fedor Khod'kov wrote:
[...]
>> I set up w3m-cookie-reject-domains, adding "google.com" and
>> ".google.com" but google.com still installs its cookies. After checking
>> w3m-cookie.el I found that problem might be in w3m-cookie-trusted-host-p
>> function; lines 291-294
>>
>>> ((eq (string-to-char (car reject)) ?.)
>>> (setq regexp (concat (regexp-quote (car reject)) "$")))
>>> (t (setq regexp (concat "^" (regexp-quote (car reject)) "$"))))
>>> (when (string-match (concat regexp "$") host)
>>
>> Here host (for example, ".google.com" is compared with
>>> (concat (concat (regexp-quote ".google.com") "$") "$")
>> which gives "\\.google\\.com$$"; string-match returns nil because of
>> double $ in the end of regexp.
>>
>> If last concat is removed, all seems to be right:
The patch looks reasonable. Thank you for pointing it out.
Fixed in the emacs-w3m CVS trunk.
Regards,