mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Strip out multiple slashes on non-post URL's. See #8948
git-svn-id: http://svn.automattic.com/wordpress/trunk@13072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6a4a3631e3
commit
c7253edea9
@ -255,6 +255,10 @@ function redirect_canonical($requested_url=null, $do_redirect=true) {
|
||||
$redirect['path'] = trailingslashit($redirect['path']);
|
||||
}
|
||||
|
||||
// Strip multiple slashes out of the URL
|
||||
if ( strpos($original['path'], '//') > -1 )
|
||||
$redirect['path'] = preg_replace('|/+|', '/', $original['path']);
|
||||
|
||||
// Always trailing slash the Front Page URL
|
||||
if ( trailingslashit( $redirect['path'] ) == trailingslashit( $user_home['path'] ) )
|
||||
$redirect['path'] = trailingslashit($redirect['path']);
|
||||
|
Loading…
Reference in New Issue
Block a user