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

Props TobiasBg.
Fixes #22135.


git-svn-id: https://develop.svn.wordpress.org/trunk@35677 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-11-18 19:39:19 +00:00
parent 1d22015fb3
commit f16f273cd2

View File

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