diff --git a/plugin/htmlpurifier/extend.video.php b/plugin/htmlpurifier/extend.video.php index 96cb5b846..24ef7c8de 100644 --- a/plugin/htmlpurifier/extend.video.php +++ b/plugin/htmlpurifier/extend.video.php @@ -24,6 +24,7 @@ if( !class_exists('HTMLPurifier_Filter_Iframevideo') ){ if (strstr($html, ']*>(.*?)?\/iframe>/i', array($this, 'trust_url_match'), $html); $html = preg_replace_callback('/]*>(.*?)?\/iframe>/i', array($this, 'trust_url_match'), $html); + $html = preg_replace_callback('/]*>(.*?)?\/iframe>/i', array($this, 'trust_url_match'), $html); //$html = preg_replace('##i', '', $html); } @@ -62,9 +63,10 @@ if( !class_exists('HTMLPurifier_Filter_Iframevideo') ){ // Domain Whitelist $youTubeMatch = preg_match('#src="https?://www.youtube(-nocookie)?.com/#i', $matches[1]); $vimeoMatch = preg_match('#src="https?://player.vimeo.com/#i', $matches[1]); - if ($youTubeMatch || $vimeoMatch) { + $fackbookMatch = preg_match('#src="https?://www.facebook.com/#i', $matches[1]); + if ($youTubeMatch || $vimeoMatch || $fackbookMatch) { $extra = ' frameborder="0"'; - if ($youTubeMatch) { + if ($youTubeMatch || $fackbookMatch) { $extra .= ' allowfullscreen'; } elseif ($vimeoMatch) { $extra .= ' webkitAllowFullScreen mozallowfullscreen allowFullScreen';