diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index 8110d3e75..036e6cdb8 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -180,17 +180,15 @@ function bb2diaspora($Text,$preserve_nl = false) {
// [img=widthxheight]image source[/img]
// $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/", '', $Text);
-// if (get_pconfig(local_user(), 'oembed', 'use_for_youtube' )==1){
-// // use oembed for youtube links
-// $Text = preg_replace("/\[youtube\]/",'[embed]',$Text);
-// $Text = preg_replace("/\[\/youtube\]/",'[/embed]',$Text);
-// } else {
-// // Youtube extensions
- // $Text = preg_replace("/\[youtube\]https?:\/\/www.youtube.com\/watch\?v\=(.*?)\[\/youtube\]/",'[youtube]$1[/youtube]',$Text);
- // $Text = preg_replace("/\[youtube\]https?:\/\/youtu.be\/(.*?)\[\/youtube\]/",'[youtube]$1[/youtube]',$Text);
-// $Text = preg_replace("/\[youtube\](.*?)\[\/youtube\]/", '', $Text);
-// }
-// $Text = preg_replace("/\[youtube\](.*?)\[\/youtube\]/", '', $Text);
+ $Text = preg_replace("/\[youtube\]https?:\/\/www.youtube.com\/watch\?v\=(.*?)\[\/youtube\]/ism",'http://www.youtube.com/watch?v=$1',$Text);
+ $Text = preg_replace("/\[youtube\]https?:\/\/www.youtube.com\/embed\/(.*?)\[\/youtube\]/ism",'http://www.youtube.com/watch?v=$1',$Text);
+ $Text = preg_replace("/\[youtube\]https?:\/\/youtu.be\/(.*?)\[\/youtube\]/ism",'http://www.youtube.com/watch?v=$1',$Text);
+ $Text = preg_replace("/\[youtube\]([A-Za-z0-9\-_=]+)(.*?)\[\/youtube\]/ism", 'http://www.youtube.com/watch?v=$1', $Text);
+
+ $Text = preg_replace("/\[vimeo\]https?:\/\/player.vimeo.com\/video\/([0-9]+)(.*?)\[\/vimeo\]/ism",'http://vimeo.com/$1',$Text);
+ $Text = preg_replace("/\[vimeo\]https?:\/\/vimeo.com\/([0-9]+)(.*?)\[\/vimeo\]/ism",'http://vimeo.com/$1',$Text);
+ $Text = preg_replace("/\[vimeo\]([0-9]+)(.*?)\[\/vimeo\]/ism", 'http://vimeo.com/$1',$Text);
+