From 35d60972f3525e2b93b90e1c60d319b779c718e7 Mon Sep 17 00:00:00 2001 From: Chris Leppanen <chris.leppanen@gmail.com> Date: Sun, 22 Jul 2012 23:39:47 -0700 Subject: [PATCH] Issue #1688294 by twistor | Rob_Feature: Fixed Invalid URL (even though it's valid). --- feeds.module | 4 ++-- tests/feeds.test | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/feeds.module b/feeds.module index 4ae1da4e..54eb3a20 100644 --- a/feeds.module +++ b/feeds.module @@ -1045,7 +1045,7 @@ function feeds_alter($type, &$data) { * * @see valid_url(). * - * @todo Replace with valid_url() when http://drupal.org/node/1191252 is fixed. + * @todo Replace with valid_url() when http://drupal.org/node/295021 is fixed. */ function feeds_valid_url($url, $absolute = FALSE) { if ($absolute) { @@ -1062,7 +1062,7 @@ function feeds_valid_url($url, $absolute = FALSE) { ) (?::[0-9]+)? # Server port number (optional) (?:[\/|\?] - (?:[\w#!:\.\?\+=&@$'~*,;\/\(\)\[\]\-]|%[0-9a-f]{2}) # The path and query (optional) + (?:[|\w#!:\.\?\+=&@$'~*,;\/\(\)\[\]\-]|%[0-9a-f]{2}) # The path and query (optional) *)? $/xi", $url); } diff --git a/tests/feeds.test b/tests/feeds.test index 358eb00f..b6213fd2 100644 --- a/tests/feeds.test +++ b/tests/feeds.test @@ -541,6 +541,7 @@ class FeedsUnitTestCase extends FeedsUnitTestHelper { 'example.org/~,$\'*;', 'caf%C3%A9.example.org', '[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html', + 'graph.asfdasdfasdf.com/blarg/feed?access_token=133283760145143|tGew8jbxi1ctfVlYh35CPYij1eE', ); foreach ($url_schemes as $scheme) { -- GitLab