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:
parent
1d22015fb3
commit
f16f273cd2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user