Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feeds
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
feeds
Commits
35d60972
Commit
35d60972
authored
12 years ago
by
Chris Leppanen
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
feeds.module
+2
-2
2 additions, 2 deletions
feeds.module
tests/feeds.test
+1
-0
1 addition, 0 deletions
tests/feeds.test
with
3 additions
and
2 deletions
feeds.module
+
2
−
2
View file @
35d60972
...
@@ -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
);
}
}
...
...
This diff is collapsed.
Click to expand it.
tests/feeds.test
+
1
−
0
View file @
35d60972
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment