WordPress.org

Make WordPress Core

Changeset 39568


Ignore:
Timestamp:
12/12/16 01:45:58 (5 months ago)
Author:
dd32
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.
Merges [39546] to the 4.7 branch.
Fixes #39145.

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/src/wp-includes/theme.php

    r39479 r39568  
    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.