aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-06-21 21:39:06 -0700
committerfriendica <info@friendica.com>2013-06-21 21:39:06 -0700
commit2fbc78e6cdf9ca01c404d1bf539008a4b384964f (patch)
tree76adedd34de9059b36c6e3f2bba3caf00db7ea10
parentf835737cb7f8174b69145750be11fe4b896e8820 (diff)
downloadvolse-hubzilla-2fbc78e6cdf9ca01c404d1bf539008a4b384964f.tar.gz
volse-hubzilla-2fbc78e6cdf9ca01c404d1bf539008a4b384964f.tar.bz2
volse-hubzilla-2fbc78e6cdf9ca01c404d1bf539008a4b384964f.zip
fix non-embeddable videos by returning plain links
-rw-r--r--include/bbcode.php9
1 files changed, 6 insertions, 3 deletions
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