Changeset 12295
- Timestamp:
- 11/30/2009 04:55:50 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/media.php
r12289 r12295 487 487 if ( !strpos($src, '://') ) 488 488 $src = "http://$src"; 489 $html = '[embed]' . $src. '[/embed]';489 $html = '[embed]' . esc_url($src) . '[/embed]'; 490 490 } else { 491 491 $src = $_POST['insertonly']['src']; … … 498 498 } 499 499 if ( !empty($src) ) 500 $html = "<img src=' $src' alt='$alt'$class />";500 $html = "<img src='" . esc_url($src) . "' alt='$alt'$class />"; 501 501 } 502 502 503 $html = apply_filters('image_send_to_editor_url', $html, $src, $alt, $align);503 $html = apply_filters('image_send_to_editor_url', $html, esc_url_raw($src), $alt, $align); 504 504 return media_send_to_editor($html); 505 505 } … … 597 597 $href = "http://$href"; 598 598 599 $html = '[embed]' . $href. '[/embed]';600 $html = apply_filters('audio_send_to_editor_url', $html, $href);599 $html = '[embed]' . esc_url($href) . '[/embed]'; 600 $html = apply_filters('audio_send_to_editor_url', $html, esc_url_raw($href)); 601 601 return media_send_to_editor($html); 602 602 } … … 648 648 $href = "http://$href"; 649 649 650 $html = '[embed]' . $href. '[/embed]';651 $html = apply_filters('video_send_to_editor_url', $html, $href);650 $html = '[embed]' . esc_url($href) . '[/embed]'; 651 $html = apply_filters('video_send_to_editor_url', $html, esc_url_raw($href)); 652 652 return media_send_to_editor($html); 653 653 } … … 703 703 $title = basename($href); 704 704 if ( !empty($title) && !empty($href) ) 705 $html = "<a href=' $href' >$title</a>";706 $html = apply_filters('file_send_to_editor_url', $html, $href, $title);705 $html = "<a href='" . esc_url($href) . "' >$title</a>"; 706 $html = apply_filters('file_send_to_editor_url', $html, esc_url_raw($href), $title); 707 707 return media_send_to_editor($html); 708 708 }
Note: See TracChangeset
for help on using the changeset viewer.