Skip to content
Snippets Groups Projects
Commit 35d60972 authored by Chris Leppanen's avatar Chris Leppanen
Browse files

Issue #1688294 by twistor | Rob_Feature: Fixed Invalid URL (even though it's valid).

parent ea36f8b4
No related branches found
No related tags found
No related merge requests found
...@@ -1045,7 +1045,7 @@ function feeds_alter($type, &$data) { ...@@ -1045,7 +1045,7 @@ function feeds_alter($type, &$data) {
* *
* @see valid_url(). * @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) { function feeds_valid_url($url, $absolute = FALSE) {
if ($absolute) { if ($absolute) {
...@@ -1062,7 +1062,7 @@ function feeds_valid_url($url, $absolute = FALSE) { ...@@ -1062,7 +1062,7 @@ function feeds_valid_url($url, $absolute = FALSE) {
) )
(?::[0-9]+)? # Server port number (optional) (?::[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); $/xi", $url);
} }
......
...@@ -541,6 +541,7 @@ class FeedsUnitTestCase extends FeedsUnitTestHelper { ...@@ -541,6 +541,7 @@ class FeedsUnitTestCase extends FeedsUnitTestHelper {
'example.org/~,$\'*;', 'example.org/~,$\'*;',
'caf%C3%A9.example.org', 'caf%C3%A9.example.org',
'[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html', '[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) { foreach ($url_schemes as $scheme) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment