fix non-embeddable videos by returning plain links

This commit is contained in:
friendica 2013-06-21 21:39:06 -07:00
parent f835737cb7
commit 2fbc78e6cd

View File

@ -424,11 +424,14 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
$Text = preg_replace_callback("/\[video\](.*?)\[\/video\]/ism", 'tryoembed', $Text);
$Text = preg_replace_callback("/\[audio\](.*?)\[\/audio\]/ism", 'tryoembed', $Text);
} else {
$Text = preg_replace("/\[video\](.*?)\[\/video\]/", '$1', $Text);
$Text = preg_replace("/\[audio\](.*?)\[\/audio\]/", '$1', $Text);
}
// if video couldn't be embedded, link to it instead.
$Text = preg_replace("/\[video\](.*?)\[\/video\]/", '$1', $Text);
$Text = preg_replace("/\[audio\](.*?)\[\/audio\]/", '$1', $Text);
// html5 video and audio