Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
f88676a5
Commit
f88676a5
authored
14 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#499774
by jbrauer: support use of feed:// URLs as synonyms for http:// in core.
parent
757a3ca1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
includes/common.inc
+2
-1
2 additions, 1 deletion
includes/common.inc
with
2 additions
and
1 deletion
includes/common.inc
+
2
−
1
View file @
f88676a5
...
...
@@ -792,6 +792,7 @@ function drupal_http_request($url, array $options = array()) {
switch
(
$uri
[
'scheme'
])
{
case
'http'
:
case
'feed'
:
$port
=
isset
(
$uri
[
'port'
])
?
$uri
[
'port'
]
:
80
;
$host
=
$uri
[
'host'
]
.
(
$port
!=
80
?
':'
.
$port
:
''
);
$fp
=
@
fsockopen
(
$uri
[
'host'
],
$port
,
$errno
,
$errstr
,
$options
[
'timeout'
]);
...
...
@@ -1071,7 +1072,7 @@ function valid_url($url, $absolute = FALSE) {
if
(
$absolute
)
{
return
(
bool
)
preg_match
(
"
/^ # Start at the beginning of the text
(?:ftp|https?):\/\/
# Look for ftp, http,
or
https schemes
(?:ftp|https?
|feed
):\/\/ # Look for ftp, http, https
or feed
schemes
(?: # Userinfo (optional) which is typically
(?:(?:[\w\.\-\+!$&'\(\)*\+,;=]|%[0-9a-f]
{
2
}
)+:)* # a username or a username and password
(?:[\w\.\-\+%!$&'\(\)*\+,;=]|%[0-9a-f]
{
2
}
)+@ # combination
...
...
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