]> git.mxchange.org Git - friendica.git/commitdiff
API: fix plaintext of reshared attachment
authorfabrixxm <fabrix.xm@gmail.com>
Fri, 15 Jul 2016 14:53:30 +0000 (16:53 +0200)
committerfabrixxm <fabrix.xm@gmail.com>
Fri, 15 Jul 2016 14:53:30 +0000 (16:53 +0200)
When replacing `[attachment]` element, text after it wasn't restored.
`[share]` element can contain `[attachment]`, the closing `[/share]` was elided,
then the `[share]` element was shown in plaintext instead of recycle symbol

include/api.php

index 832240f716340b26bed12d96a74477c2e52ba2ab..5512dffd35945308c1621caba08746ae676de625 100644 (file)
                $include_entities = strtolower(x($_REQUEST,'include_entities')?$_REQUEST['include_entities']:"false");
 
                $Text = bb_CleanPictureLinks($Text);
-
                $URLSearchString = "^\[\]";
 
                $Text = preg_replace("/([!#@])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",'$1$3',$Text);
                if (isset($data["url"]))
                        $body .= "\n".$data["url"];
 
+               $body .= $data["after"];
+
                return $body;
        }