]> git.mxchange.org Git - friendica.git/commitdiff
fix youtube videos that use https:// urls
authorFriendika <info@friendika.com>
Tue, 15 Mar 2011 07:56:25 +0000 (00:56 -0700)
committerFriendika <info@friendika.com>
Tue, 15 Mar 2011 07:56:25 +0000 (00:56 -0700)
include/bbcode.php

index 978b4af692bdafd87c0d8337afc8d33743a0e3da..4caf187666852b26739f815366e86453b2cc89ce 100644 (file)
@@ -90,7 +90,7 @@ function bbcode($Text) {
        $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.+?)\[\/img\]/", '<img src="$3" height="$2" width="$1">', $Text);
 
        // Youtube extensions
-        $Text = preg_replace("/\[youtube\]http:\/\/www.youtube.com\/watch\?v\=(.+?)\[\/youtube\]/",'[youtube]$1[/youtube]',$Text); 
+        $Text = preg_replace("/\[youtube\]https?:\/\/www.youtube.com\/watch\?v\=(.+?)\[\/youtube\]/",'[youtube]$1[/youtube]',$Text); 
        $Text = preg_replace("/\[youtube\](.+?)\[\/youtube\]/", '<object width="425" height="350" type="application/x-shockwave-flash" data="http://www.youtube.com/v/$1" ><param name="movie" value="http://www.youtube.com/v/$1"></param><!--[if IE]><embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" width="425" height="350" /><![endif]--></object>', $Text);
 
        // oembed tag