mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-17 03:56:07 +00:00
Customize: Make sure that preview and return URLs are URLs.
Merge of [37527] to the 3.9 branch. Built from https://develop.svn.wordpress.org/branches/3.9@37777 git-svn-id: http://core.svn.wordpress.org/branches/3.9@37742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0f819f1f57
commit
3c90ea60d9
@ -17,9 +17,10 @@ if ( ! current_user_can( 'edit_theme_options' ) )
|
||||
|
||||
wp_reset_vars( array( 'url', 'return' ) );
|
||||
$url = urldecode( $url );
|
||||
$url = esc_url_raw( $url );
|
||||
$url = wp_validate_redirect( $url, home_url( '/' ) );
|
||||
if ( $return )
|
||||
$return = wp_validate_redirect( urldecode( $return ) );
|
||||
$return = wp_validate_redirect( esc_url_raw( urldecode( $return ) ) );
|
||||
if ( ! $return )
|
||||
$return = $url;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user