//$txt = urldecode(requestdata('status'));
if ((strpos($txt, '<') !== false) || (strpos($txt, '>') !== false)) {
- $txt = HTML::htmlToBBVideo($txt);
+ $txt = HTML::toBBVideo($txt);
$config = HTMLPurifier_Config::createDefault();
$config->set('Cache.DefinitionImpl', null);
$purifier = new HTMLPurifier($config);
if (requestdata('htmlstatus')) {
$txt = requestdata('htmlstatus');
if ((strpos($txt, '<') !== false) || (strpos($txt, '>') !== false)) {
- $txt = HTML::htmlToBBVideo($txt);
+ $txt = HTML::toBBVideo($txt);
$config = HTMLPurifier_Config::createDefault();
$config->set('Cache.DefinitionImpl', null);
*
* @param string $s
*/
- public static function htmlToBBVideo($s)
+ public static function toBBVideo($s)
{
$s = preg_replace(
'#<object[^>]+>(.*?)https?://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+)(.*?)</object>#ism',
$base_url = get_app()->getBaseURL();
$item['body'] = HTML::relToAbs($item['body'], $base_url);
- $item['body'] = HTML::htmlToBBVideo($item['body']);
+ $item['body'] = HTML::toBBVideo($item['body']);
$item['body'] = OEmbed::HTML2BBCode($item['body']);