Google News "Custom Range" broken

Ask for help about NoScript, no registration needed to post
kitchin
Posts: 3
Joined: Fri Oct 29, 2010 2:12 pm

Google News "Custom Range" broken

Post by kitchin »

This bug prevents searching Google News with a custom date range.

Steps to reproduce:
1. Google search something
2. Click "News" in left-hand column
3. Click "Custom range..." in left column

Expected Result:
Popover calendar picker

Actual Result:
Very briefly shows popover then loads main Google search result (not News), since that is the href attribute of the <a> tag.
Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20120704 Firefox/15.0a2
User avatar
therube
Ambassador
Posts: 7991
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Google News "Custom Range" broken

Post by therube »

Working for me.
Other then defaults, all I have allowed is google.com.

http://www.google.com/search?hl=en&gl=u ... re+orioles

Clicking Custom range... emboldens it, From:, To:, & a Search button drop down, & the calendar picker pops up.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120705 Firefox/15.0a2 SeaMonkey/2.12a2
kitchin
Posts: 3
Joined: Fri Oct 29, 2010 2:12 pm

Re: Google News "Custom Range" broken

Post by kitchin »

I run NoScript with "Allow Scripts Globally." I have not made any special settings for Google.

I started some debugging, now using 2.8.rc1. The HTML is of this form:

a href="..." onclick="google.x(...); return false;"

I inserted an alert() just before "return false" and it fires. The calendar picker displays. But then return false is ignored (I guess) and the href takes over and loads a new page.
Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20120705 Firefox/15.0a2
kitchin
Posts: 3
Joined: Fri Oct 29, 2010 2:12 pm

Re: Google News "Custom Range" broken

Post by kitchin »

Found something in Surrogate scripts. The code in noscript.surrogate.glinks.replacement does this:

Code: Select all

a._href=a.href=a.href.replace(...);
Removing that part fixes the problem in Google News. In fact, any code there that assigns to a.href breaks News. For example:

Code: Select all

a._href=a.href; a.href=a._href; // breaks
a._href=a.href; // does not break
a.href=a.href; // breaks
Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20120711 Firefox/15.0a2
Post Reply