From 93c71d1be98eda09f58c4f362403df4b3ab27eee Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Tue, 21 Jun 2016 14:17:08 +0000 Subject: [PATCH] Customize: Make sure that preview and return URLs are URLs. Merge of [37527] to the 4.4 branch. git-svn-id: https://develop.svn.wordpress.org/branches/4.4@37769 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-customize-manager.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php index b789556393..2344c6db74 100644 --- a/src/wp-includes/class-wp-customize-manager.php +++ b/src/wp-includes/class-wp-customize-manager.php @@ -1489,6 +1489,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( '/' ) ); } @@ -1520,6 +1521,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;