Ticket #25280: 25280.diff
File 25280.diff, 682 bytes (added by , 11 years ago) |
---|
-
wp-includes/class.wp-scripts.php
148 148 $l10n[$key] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8'); 149 149 } 150 150 151 $script = "var $object_name = " . json_encode($l10n) . ';'; 151 // Add JSON_NUMERIC_CHECK (introduced in PHP 5.3.3) if available so numbers are passed properly. 152 $script = "var $object_name = " . ( defined( 'JSON_NUMERIC_CHECK' ) ? json_encode( $l10n, JSON_NUMERIC_CHECK ) : json_encode( $l10n ) ) . ';'; 152 153 153 154 if ( !empty($after) ) 154 155 $script .= "\n$after;";