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/class-wp-editor.php

    r30002 r30055  
    501501
    502502                if ( ! empty( $mce_external_plugins ) ) {
    503                     self::$first_init['external_plugins'] = json_encode( $mce_external_plugins );
     503                    self::$first_init['external_plugins'] = wp_json_encode( $mce_external_plugins );
    504504                }
    505505
     
    987987        }
    988988
    989         return "tinymce.addI18n( '$mce_locale', " . json_encode( $mce_translation ) . ");\n" .
     989        return "tinymce.addI18n( '$mce_locale', " . wp_json_encode( $mce_translation ) . ");\n" .
    990990            "tinymce.ScriptLoader.markDone( '$baseurl/langs/$mce_locale.js' );\n";
    991991    }
Note: See TracChangeset for help on using the changeset viewer.