- #49211: Fix bug with linking to absolute URLs through l()
parent
d29d596674
commit
3ead560368
|
@ -908,7 +908,7 @@ function url($path = NULL, $query = NULL, $fragment = NULL, $absolute = FALSE) {
|
||||||
|
|
||||||
// Return an external link if $path contains an allowed absolute URL.
|
// Return an external link if $path contains an allowed absolute URL.
|
||||||
// Only call the slow filter_xss_bad_protocol if $path contains a ':'.
|
// Only call the slow filter_xss_bad_protocol if $path contains a ':'.
|
||||||
if (strpos($path, ':') !== FALSE && filter_xss_bad_protocol($path) == $path) {
|
if (strpos($path, ':') !== FALSE && filter_xss_bad_protocol($path, FALSE) == check_plain($path)) {
|
||||||
// Split off the fragment
|
// Split off the fragment
|
||||||
if (strpos($path, '#')) {
|
if (strpos($path, '#')) {
|
||||||
list($path, $old_fragment) = explode('#', $path, 2);
|
list($path, $old_fragment) = explode('#', $path, 2);
|
||||||
|
|
Loading…
Reference in New Issue