Strip slashes when inserting media into the editor. Fixes #7488 for 2.7
git-svn-id: http://svn.automattic.com/wordpress/trunk@8605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2a22782bb0
commit
879524a2dd
|
@ -280,7 +280,7 @@ function media_upload_form_handler() {
|
||||||
if ( isset($_POST['send']) ) {
|
if ( isset($_POST['send']) ) {
|
||||||
$keys = array_keys($_POST['send']);
|
$keys = array_keys($_POST['send']);
|
||||||
$send_id = (int) array_shift($keys);
|
$send_id = (int) array_shift($keys);
|
||||||
$attachment = $_POST['attachments'][$send_id];
|
$attachment = stripslashes_deep( $_POST['attachments'][$send_id] );
|
||||||
$html = $attachment['post_title'];
|
$html = $attachment['post_title'];
|
||||||
if ( !empty($attachment['url']) ) {
|
if ( !empty($attachment['url']) ) {
|
||||||
if ( strpos($attachment['url'], 'attachment_id') || false !== strpos($attachment['url'], get_permalink($_POST['post_id'])) )
|
if ( strpos($attachment['url'], 'attachment_id') || false !== strpos($attachment['url'], get_permalink($_POST['post_id'])) )
|
||||||
|
|
Loading…
Reference in New Issue