I created two Google RSS feed URLs, and added them to the Feed Aggregator. The RSS URL for a simple, one-word search term worked. The RSS URL for a more complex search term wasn't accepted by the Feed Aggregator.

Steps to create the URLs in Google (using Safari browser):
1. Go to Google news and enter the simple or complex search term below, then click "Search"
Simple: rabbits
Complex: ("web development" OR "open source") location:uk -source:cubed3

2. Click the "RSS" button in the URL bar, and the search will be shown as an RSS feed.

3. Copy this feed URL.

Steps to create the feed in the Drupal Feed Aggregator Module:
1. From Drupal Home, as an Administrator, select Administer › Content management › Feed aggregator
Add feed.

2. Add a title, and one of the two RSS Feed URLs copied from Google, making sure the protocol is set to http://, not feed://, then click the "Save" button:
Simple: http://news.google.com/news?pz=1&cf=all&ned=uk&hl=en&q=rabbits&cf=all&output=rss
Complex: http://news.google.com/news?pz=1&cf=all&ned=uk&hl=en&q=(%22web+[...]&output=rss

3. The simple URL works. the complex URL returns this error:
The URL http://news.google.com/news?pz=1&cf=all&ned=uk&hl=en&q=(%22web+development%22+OR+%22open+source%22)+location:uk+-source:cubed3&cf=all&output=rss is invalid. Please enter a fully-qualified URL, such as http://www.example.com/feed.xml.

Expected Behaviour:
The complex feed URL is accepted just as the simple URL was accepted, because both are valid.

Comments

heine’s picture

Status: Active » Postponed (maintainer needs more info)

Can you please try to reproduce this in the latest version of Drupal 6? It might have been fixed with #124492: valid_url() does not support all valid URL characters (as of Drupal 6.9).

dddave’s picture

Version: 6.6 » 6.19
Status: Postponed (maintainer needs more info) » Fixed

Setting to fixed due to the lack of feedback. If the problem still exists please reopen.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

stan turyn’s picture

I'm experiencing pretty much the exact same problem - 'Invalid URL' when adding complex Google News feeds.

Example of the feed: http://news.google.co.uk/news?q=personal+finance&hl=en&cr=countryUK|countryGB&gl=uk&bav=on.2,or.r_gc.r_pw.,cf.osb&biw=1366&bih=593&um=1&ie=UTF-8&output=rss

Obviously valid_url() does not like it.

Using Drupal 6.22

lucascaro’s picture

The same still happens with drupal 7.12

the following url, taken from google news, was reported as invalid:
http://news.google.com/news?hl=en&gl=us&q=international+%28mail|shipping%29&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.,cf.osb&biw=1276&bih=879&um=1&ie=UTF-8&output=rss

my temporary solution was to shorten the url using goo.gl and it seemed to work but I started getting the following error:

PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'link' at row 1: INSERT INTO {aggregator_item} (title, link, author, description, guid, timestamp, fid) [...]

whick seems to be related to #218004: Allow aggregator feed URLs longer than 255 characters