WordPress.org

Make WordPress Core

Changeset 39546


Ignore:
Timestamp:
12/09/16 01:42:23 (10 months ago)
Author:
westonruter
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme.php

    r39477 r39546  
    15551555 
    15561556    if ( $background ) { 
    1557         $image = " background-image: url(" . wp_json_encode( $background ) . ");"; 
     1557        $image = ' background-image: url("' . esc_url_raw( $background ) . '");'; 
    15581558 
    15591559        // Background Position. 
Note: See TracChangeset for help on using the changeset viewer.