Media: in `media_send_to_editor()`, use `wp_json_encode()` instead of `addslashes()`.

Props TobiasBg.
Fixes #22135.

Built from https://develop.svn.wordpress.org/trunk@35677


git-svn-id: http://core.svn.wordpress.org/trunk@35641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-11-18 19:40:27 +00:00
parent a9fb6e9ae0
commit f2e9e98fa6
2 changed files with 2 additions and 2 deletions

View File

@ -248,7 +248,7 @@ function media_send_to_editor($html) {
?>
<script type="text/javascript">
var win = window.dialogArguments || opener || parent || top;
win.send_to_editor('<?php echo addslashes($html); ?>');
win.send_to_editor( <?php echo wp_json_encode( $html ); ?> );
</script>
<?php
exit;

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-beta4-35676';
$wp_version = '4.4-beta4-35677';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.