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

Re: shortcut Google search result snooping



In [emacs-w3m : No.11820] jidanni@xxxxxxxxxxx wrote:
> The regexp needs refining, else some URLs with +'s in them will be cut
> off, like the first result of
> http://www.google.com.tw/search?q=getElementsByAttribute+-+CodingForums.com&ie=utf-8&oe=utf-8
> for which one needs to visit the 庫存 page.

Thanks for pointing it out.  That is not due to the regexp in question.
In a search result Google encodes some special characters like "+" and
"?" to "%2B" and "%3F" in a real url, so we need to decode them.  Try
replacing the line

      (replace-match "\\1\\2\">")))

in your "Google Analytics tracking" filter with:

      (insert (w3m-url-decode-string
	       (prog1
		   (concat (match-string 1) (match-string 2) "\">")
		 (delete-region (match-beginning 0) (match-end 0)))))))

I've done it in CVS.