WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/28/2014 06:34:16 PM (6 years ago)
Author:
pento
Message:

Add wp_json_encode(), a wrapper for json_encode() that ensures everything is converted to UTF-8.

Change all core calls from json_encode() to wp_json_encode().

Fixes #28786.

File:
1 edited

Legend:

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

    r29914 r30055  
    13991399    ?></ol>
    14001400    </noscript>
    1401     <script type="application/json" class="wp-playlist-script"><?php echo json_encode( $data ) ?></script>
     1401    <script type="application/json" class="wp-playlist-script"><?php echo wp_json_encode( $data ) ?></script>
    14021402</div>
    14031403    <?php
     
    25832583    );
    25842584
    2585     $script = 'var _wpPluploadSettings = ' . json_encode( $settings ) . ';';
     2585    $script = 'var _wpPluploadSettings = ' . wp_json_encode( $settings ) . ';';
    25862586
    25872587    if ( $data )
Note: See TracChangeset for help on using the changeset viewer.