use microformat to mark html from [embed] tag, convert html with oembed microformat to [embed] tag
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
require_once('bbcode.php');
|
||||
require_once('oembed.php');
|
||||
|
||||
function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) {
|
||||
|
||||
@@ -395,6 +396,8 @@ function get_atom_elements($feed,$item) {
|
||||
$res['body'] = preg_replace('#<object[^>]+>.+?' . 'http://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?</object>#s',
|
||||
'[youtube]$1[/youtube]', $res['body']);
|
||||
|
||||
$res['body'] = oembed_html2bbcode($res['body']);
|
||||
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
$config->set('Cache.DefinitionImpl', null);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user