From 2fbc78e6cdf9ca01c404d1bf539008a4b384964f Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 21 Jun 2013 21:39:06 -0700 Subject: fix non-embeddable videos by returning plain links --- include/bbcode.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/bbcode.php b/include/bbcode.php index 4f99a8038..a06d8c4d8 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -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 -- cgit v1.2.3