aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-05-20 15:46:41 -0700
committerFriendika <info@friendika.com>2011-05-20 15:46:41 -0700
commit0abf2f11c6b3caaad2f9a833f477a094b7488e9a (patch)
tree07ed57fe2b3c17fe8b688b3472579ee770cdc1a0 /include/items.php
parent5f20925220574323e8d32483e57ef9ebbf0b3256 (diff)
downloadvolse-hubzilla-0abf2f11c6b3caaad2f9a833f477a094b7488e9a.tar.gz
volse-hubzilla-0abf2f11c6b3caaad2f9a833f477a094b7488e9a.tar.bz2
volse-hubzilla-0abf2f11c6b3caaad2f9a833f477a094b7488e9a.zip
patches for youtube's change in link and embed formats, please test
Diffstat (limited to 'include/items.php')
-rw-r--r--include/items.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index 8c2c78696..3170b9384 100644
--- a/include/items.php
+++ b/include/items.php
@@ -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);