From 45dc424bc1a6d13b9e5220922ef59683e345c30a Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Tue, 21 Jun 2016 14:16:56 +0000 Subject: [PATCH] Customize: Make sure that preview and return URLs are URLs. Merge of [37527] to the 4.5 branch. Built from https://develop.svn.wordpress.org/branches/4.5@37768 git-svn-id: http://core.svn.wordpress.org/branches/4.5@37733 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize-manager.php | 2 ++ wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index 8057e57ae0..74819516bd 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/wp-includes/class-wp-customize-manager.php @@ -1542,6 +1542,7 @@ final class WP_Customize_Manager { * @param string $preview_url URL to be previewed. */ public function set_preview_url( $preview_url ) { + $preview_url = esc_url_raw( $preview_url ); $this->preview_url = wp_validate_redirect( $preview_url, home_url( '/' ) ); } @@ -1573,6 +1574,7 @@ final class WP_Customize_Manager { * @param string $return_url URL for return link. */ public function set_return_url( $return_url ) { + $return_url = esc_url_raw( $return_url ); $return_url = remove_query_arg( wp_removable_query_args(), $return_url ); $return_url = wp_validate_redirect( $return_url ); $this->return_url = $return_url; diff --git a/wp-includes/version.php b/wp-includes/version.php index 931f1d9dfc..b57ff96f49 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5.3-alpha-37759'; +$wp_version = '4.5.3-alpha-37768'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.