Copyright (c) 2009 MetaYii
---------------------------------------------------------------------------------------------
Note: if you use this extension and you use the embed media plugin and the HTMLPurifier feature of Yii, you need to extend the HTMLPurifier class to include something like
this:
class HTMLPurifier_Filter_YouTube extends HTMLPurifier_Filter
{
public $name = 'YouTube';
public function preFilter($html, $config, $context)
{
$pre_regex = '##s';
$pre_replace = '\1*\2*\3*\4';
$x = preg_replace($pre_regex, $pre_replace, $html);
return $x;
}
public function postFilter($html, $config, $context)
{
$post_regex = '#([A-Za-z]+)\*([A-Za-z0-9\-_\/\&\=\:\.\;\?\%]+)\*([0-9]+)\*([0-9]+)#';
$post_replace = ' ';
$x = preg_replace($post_regex, $post_replace, $html);
return $x;
}
}
, otherwise HTMLPurifier will mess your multimedia content (