diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/bbcode.php | 9 |
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 |