Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
366df7f1
Commit
366df7f1
authored
Sep 28, 2011
by
catch
Browse files
Issue
#1113702
by franz: Fixed Comment in url_is_external() wrong.
parent
3bc98cb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/common.inc
View file @
366df7f1
...
...
@@ -2197,8 +2197,9 @@ function url($path = NULL, array $options = array()) {
*/
function
url_is_external
(
$path
)
{
$colonpos
=
strpos
(
$path
,
':'
);
// Only call the slow drupal_strip_dangerous_protocols() if $path contains a
// ':' before any / ? or #.
// Avoid calling drupal_strip_dangerous_protocols() if there is any
// slash (/), hash (#) or question_mark (?) before the colon (:)
// occurrence - if any - as this would clearly mean it is not a URL.
return
$colonpos
!==
FALSE
&&
!
preg_match
(
'![/?#]!'
,
substr
(
$path
,
0
,
$colonpos
))
&&
drupal_strip_dangerous_protocols
(
$path
)
==
$path
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment