Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
d692d438
Commit
d692d438
authored
Oct 15, 2006
by
Dries Buytaert
Browse files
- Patch
#82741
by Wesley: fixed incorrect comparison in url().
parent
8d74e4c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/common.inc
View file @
d692d438
...
...
@@ -1022,7 +1022,7 @@ function url($path = NULL, $query = NULL, $fragment = NULL, $absolute = FALSE) {
// Only call the slow filter_xss_bad_protocol if $path contains a ':'.
if
(
strpos
(
$path
,
':'
)
!==
FALSE
&&
filter_xss_bad_protocol
(
$path
,
FALSE
)
==
check_plain
(
$path
))
{
// Split off the fragment
if
(
strpos
(
$path
,
'#'
))
{
if
(
strpos
(
$path
,
'#'
)
!==
FALSE
)
{
list
(
$path
,
$old_fragment
)
=
explode
(
'#'
,
$path
,
2
);
if
(
isset
(
$old_fragment
)
&&
!
isset
(
$fragment
))
{
$fragment
=
'#'
.
$old_fragment
;
...
...
@@ -1030,7 +1030,7 @@ function url($path = NULL, $query = NULL, $fragment = NULL, $absolute = FALSE) {
}
// Append the query
if
(
isset
(
$query
))
{
$path
.
=
(
strpos
(
$path
,
'?'
)
?
'&'
:
'?'
)
.
$query
;
$path
.
=
(
strpos
(
$path
,
'?'
)
!==
FALSE
?
'&'
:
'?'
)
.
$query
;
}
// Reassemble
return
$path
.
$fragment
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment