mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-19 01:43:44 +03:00
Pledges: URL encode JSON data to avoid i18n character issues.
This commit is contained in:
parent
609ff42620
commit
cc5303fa11
|
@ -60,7 +60,10 @@ function enqueue_scripts() {
|
|||
);
|
||||
}
|
||||
|
||||
$inline_script = sprintf( 'var fiveFutureCompanies = %s;', wp_json_encode( $companies ) );
|
||||
$inline_script = sprintf(
|
||||
'var fiveFutureCompanies = JSON.parse( decodeURIComponent( \'%s\' ) );',
|
||||
rawurlencode( wp_json_encode( $companies ) )
|
||||
);
|
||||
|
||||
wp_enqueue_style( '5ftf-front-end' );
|
||||
wp_enqueue_script( '5ftf-list' );
|
||||
|
|
Loading…
Reference in a new issue