mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-12 13:44:21 +01:00
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:
parent
c68f1de5f8
commit
592c3fc7d7
@ -1554,7 +1554,7 @@ function _custom_background_cb() {
|
|||||||
$style = $color ? "background-color: #$color;" : '';
|
$style = $color ? "background-color: #$color;" : '';
|
||||||
|
|
||||||
if ( $background ) {
|
if ( $background ) {
|
||||||
$image = " background-image: url(" . wp_json_encode( $background ) . ");";
|
$image = ' background-image: url("' . esc_url_raw( $background ) . '");';
|
||||||
|
|
||||||
// Background Position.
|
// Background Position.
|
||||||
$position_x = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) );
|
$position_x = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) );
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user