mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-29 15:44:27 +00:00
Attr escaping
git-svn-id: https://develop.svn.wordpress.org/trunk@11173 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -382,10 +382,12 @@ var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
|
||||
$content = '';
|
||||
if ( preg_match("/youtube\.com\/watch/i", $url) ) {
|
||||
list($domain, $video_id) = split("v=", $url);
|
||||
$video_id = attr($video_id);
|
||||
$content = '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/' . $video_id . '"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/' . $video_id . '" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>';
|
||||
|
||||
} elseif ( preg_match("/vimeo\.com\/[0-9]+/i", $url) ) {
|
||||
list($domain, $video_id) = split(".com/", $url);
|
||||
$video_id = attr($video_id);
|
||||
$content = '<object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=' . $video_id . '&server=www.vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" /> <embed src="http://www.vimeo.com/moogaloop.swf?clip_id=' . $video_id . '&server=www.vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object>';
|
||||
|
||||
if ( trim($selection) == '' )
|
||||
|
||||
Reference in New Issue
Block a user