aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMichael Vogel <icarus@dabo.de>2012-03-11 20:22:28 +0100
committerMichael Vogel <icarus@dabo.de>2012-03-11 20:22:28 +0100
commitd653e27e2dfc172fd66a0987312952d736aca3e7 (patch)
treee0725ca5cf27fc4400a7566eebc0721528d69fd4 /include
parentebdf4842184cc8d0576abe99b29650c6b6512167 (diff)
parent1dad15a021cc5d03f4238ab77ff051fc0ca1e35e (diff)
downloadvolse-hubzilla-d653e27e2dfc172fd66a0987312952d736aca3e7.tar.gz
volse-hubzilla-d653e27e2dfc172fd66a0987312952d736aca3e7.tar.bz2
volse-hubzilla-d653e27e2dfc172fd66a0987312952d736aca3e7.zip
Merge commit 'upstream/master'
Conflicts: view/theme/diabook/wall_item.tpl view/theme/diabook/wallwall_item.tpl
Diffstat (limited to 'include')
-rw-r--r--include/bbcode.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index cff26f5c8..d69cb263f 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -216,6 +216,9 @@ function bbcode($Text,$preserve_nl = false) {
$Text = preg_replace("/\[img\](.*?)\[\/img\]/ism", '<img src="$1" alt="' . t('Image/photo') . '" />', $Text);
+ $Text = preg_replace("/\[video\](.*?\.(ogg|ogv|oga|ogm|webm|mp4))\[\/video\]/ism", '<video src="$1" controls="controls" width="425" height="350"><a href="$1">$1</a></video>', $Text);
+
+ $Text = preg_replace("/\[audio\](.*?\.(ogg|ogv|oga|ogm|webm|mp4|mp3))\[\/audio\]/ism", '<audio src="$1" controls="controls"><a href="$1">$1</a></audio>', $Text);
// Try to Oembed
$Text = preg_replace_callback("/\[video\](.*?)\[\/video\]/ism", 'tryoembed', $Text);
@@ -224,9 +227,6 @@ function bbcode($Text,$preserve_nl = false) {
// html5 video and audio
- $Text = preg_replace("/\[video\](.*?)\[\/video\]/ism", '<video src="$1" controls="controls" width="425" height="350"><a href="$1">$1</a></video>', $Text);
-
- $Text = preg_replace("/\[audio\](.*?)\[\/audio\]/ism", '<audio src="$1" controls="controls"><a href="$1">$1</a></audio>', $Text);
$Text = preg_replace("/\[iframe\](.*?)\[\/iframe\]/ism", '<iframe src="$1" width="425" height="350"><a href="$1">$1</a></iframe>', $Text);