use microformat to mark html from [embed] tag, convert html with oembed microformat to [embed] tag
This commit is contained in:
parent
6ea87223d3
commit
49ea05b8ff
3 changed files with 44 additions and 5 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue