diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 9175cfcc06..4eeeecd5fb 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -2687,8 +2687,11 @@ function edit_form_image_editor( $post ) { - post_content, 'attachment_content', $editor_args ); ?> + } + + ?> + + post_content ), 'attachment_content', $editor_args ); ?> - " . ( $broken_theme->get( 'Name' ) ? $broken_theme->get( 'Name' ) : $broken_theme->get_stylesheet() ) . " + get( 'Name' ) ? $broken_theme->display( 'Name' ) : esc_html( $broken_theme->get_stylesheet() ); ?> " . $broken_theme->errors()->get_error_message() . " "; } diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 33ab866b9c..b4678cdf7d 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -1138,7 +1138,7 @@ if ( !function_exists('wp_sanitize_redirect') ) : * @return string redirect-sanitized URL **/ function wp_sanitize_redirect($location) { - $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!]|i', '', $location); + $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!@]|i', '', $location); $location = wp_kses_no_null($location); // remove %0d and %0a from location @@ -1194,7 +1194,7 @@ if ( !function_exists('wp_validate_redirect') ) : * @return string redirect-sanitized URL **/ function wp_validate_redirect($location, $default = '') { - $location = trim( $location, " \t\n\r\0\x08\x0B" ); + $location = wp_sanitize_redirect( trim( $location, " \t\n\r\0\x08\x0B" ) ); // browsers will assume 'http' is your protocol, and will obey a redirect to a URL starting with '//' if ( substr($location, 0, 2) == '//' ) $location = 'http:' . $location;