Customize: Use esc_url_raw() instead of wp_json_encode() to eliminate extraneous slashes when outputting background image URL in CSS url().

Props tyxla, westonruter.
See #22058.
Fixes #39145.

Built from https://develop.svn.wordpress.org/trunk@39546


git-svn-id: http://core.svn.wordpress.org/trunk@39486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2016-12-09 01:43:42 +00:00
parent c68f1de5f8
commit 592c3fc7d7
2 changed files with 2 additions and 2 deletions

View File

@ -1554,7 +1554,7 @@ function _custom_background_cb() {
$style = $color ? "background-color: #$color;" : '';
if ( $background ) {
$image = " background-image: url(" . wp_json_encode( $background ) . ");";
$image = ' background-image: url("' . esc_url_raw( $background ) . '");';
// Background Position.
$position_x = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-39545';
$wp_version = '4.8-alpha-39546';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.