mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
patches for youtube's change in link and embed formats, please test
This commit is contained in:
parent
5f20925220
commit
0abf2f11c6
4 changed files with 19 additions and 1 deletions
|
@ -354,6 +354,9 @@ 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'] = preg_replace('#<iframe[^>].+?' . 'http://www.youtube.com/embed/[A-Za-z0-9\-_=]+).+?</iframe>#s',
|
||||
'[youtube]$1[/youtube]', $res['body']);
|
||||
|
||||
$res['body'] = oembed_html2bbcode($res['body']);
|
||||
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
|
@ -521,6 +524,10 @@ function get_atom_elements($feed,$item) {
|
|||
$body = preg_replace('#<object[^>]+>.+?' . 'http://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?</object>#s',
|
||||
'[youtube]$1[/youtube]', $body);
|
||||
|
||||
$res['body'] = preg_replace('#<iframe[^>].+?' . 'http://www.youtube.com/embed/[A-Za-z0-9\-_=]+).+?</iframe>#s',
|
||||
'[youtube]$1[/youtube]', $res['body']);
|
||||
|
||||
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
$config->set('Cache.DefinitionImpl', null);
|
||||
|
||||
|
@ -560,6 +567,9 @@ function get_atom_elements($feed,$item) {
|
|||
$body = preg_replace('#<object[^>]+>.+?' . 'http://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?</object>#s',
|
||||
'[youtube]$1[/youtube]', $body);
|
||||
|
||||
$res['body'] = preg_replace('#<iframe[^>].+?' . 'http://www.youtube.com/embed/[A-Za-z0-9\-_=]+).+?</iframe>#s',
|
||||
'[youtube]$1[/youtube]', $res['body']);
|
||||
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
$config->set('Cache.DefinitionImpl', null);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue