Convert html entities in script localization strings, see #11520
git-svn-id: http://svn.automattic.com/wordpress/trunk@18804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d58e337d24
commit
e30854e968
|
@ -62,7 +62,7 @@ class WP_Scripts extends WP_Dependencies {
|
|||
$after = $data['l10n_print_after'];
|
||||
unset($data['l10n_print_after']);
|
||||
}
|
||||
$output = "var $name = " . json_encode($data) . "; $after\n";
|
||||
$output = "var $name = " . json_encode( html_entity_decode($data, ENT_QUOTES, 'UTF-8') ) . "; $after\n";
|
||||
} else {
|
||||
$data = $this->get_data( $handle, 'data' );
|
||||
|
||||
|
@ -70,7 +70,7 @@ class WP_Scripts extends WP_Dependencies {
|
|||
return false;
|
||||
|
||||
foreach ( (array) $data as $name => $data ) {
|
||||
$output = "var $name = " . json_encode($data) . ";\n";
|
||||
$output = "var $name = " . json_encode( html_entity_decode($data, ENT_QUOTES, 'UTF-8') ) . ";\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue