Tatsuya Kinoshita wrote:
> Hi Trent,
>
> On May 27, 2012 at 6:46PM +1000, trentbuck (at gmail.com) wrote:
> > Package: w3m-el-snapshot
> > Version: 1.4.478+0.20120501-1
> > Around 15 July 2011, this stopped working properly. It turned out to
> > be because Wikipedia started treating these links differently:
> >
> > https://en.wikipedia.org/wiki/Special:Search/foo+bar
> > https://en.wikipedia.org/wiki/Special:Search/foo%20bar
>
> Do you still have a problem?
>
> Currently, foo+bar seems to work.
I've been using this patch:
;;; Guerilla patch -- http://bugs.debian.org/674744
(eval-after-load "w3m-search"
'(defun w3m-search-escape-query-string (str &optional coding)
(mapconcat
(lambda (s)
(w3m-url-encode-string s (or coding w3m-default-coding-system)))
(split-string str)
"%20")))
Although now I look at it, this is simpler:
(eval-after-load "w3m-search"
'(defun w3m-search-escape-query-string (str &optional coding)
(w3m-url-encode-string str (or coding w3m-default-coding-system))))
Wikipedia *does* give diffrent results for .../foo+bar and .../foo bar
(encoded as %20 or not). The former has no exact match, so it goes to
a results page, the latter goes to a specific article.
Do any search engines need "+" instead of " "?
If not, maybe this function should not bother to split and rejoin.
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]