aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2020-01-30 15:58:36 -0800
committerzotlabs <mike@macgirvin.com>2020-01-30 15:58:36 -0800
commitb8d7647c48f9683909476d14c6f94195980b15a2 (patch)
treebed30f592e179da1a842114370bdd402cafb2495 /include
parent989443a5698adf5e7a93f874048699526aa103a7 (diff)
parentc50a311ff32d7361d0809d87b03be1b4ec25b783 (diff)
downloadvolse-hubzilla-b8d7647c48f9683909476d14c6f94195980b15a2.tar.gz
volse-hubzilla-b8d7647c48f9683909476d14c6f94195980b15a2.tar.bz2
volse-hubzilla-b8d7647c48f9683909476d14c6f94195980b15a2.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'include')
-rw-r--r--include/bbcode.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index 301ffbd24..f3ecbd9e9 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -1237,9 +1237,18 @@ function bbcode($Text, $options = []) {
if (strpos($Text,'[/img]') !== false) {
$Text = preg_replace("/\[img\](.*?)\[\/img\]/ism", '<img style="max-width: 100%;" src="$1" alt="' . t('Image/photo') . '" />', $Text);
}
+ // [img=pathtoimage]image description[/img]
+ if (strpos($Text,'[/img]') !== false) {
+ $Text = preg_replace("/\[img=http(.*?)\](.*?)\[\/img\]/ism", '<img style="max-width: 100%;" src="http$1" alt="$2" title="$2"/>', $Text);
+ }
+ // [zmg]pathtoimage[/zmg]
if (strpos($Text,'[/zmg]') !== false) {
$Text = preg_replace("/\[zmg\](.*?)\[\/zmg\]/ism", '<img class="zrl" style="max-width: 100%;" src="$1" alt="' . t('Image/photo') . '" />', $Text);
}
+ // [zmg=pathtoimage]image description[/zmg]
+ if (strpos($Text,'[/zmg]') !== false) {
+ $Text = preg_replace("/\[zmg=http(.*?)\](.*?)\[\/zmg\]/ism", '<img class="zrl" style="max-width: 100%;" src="http$1" alt="$2" title="$2"/>', $Text);
+ }
// [img float={left, right}]pathtoimage[/img]
if (strpos($Text,'[/img]') !== false) {