From: fabrixxm Date: Fri, 15 Jul 2016 14:53:30 +0000 (+0200) Subject: API: fix plaintext of reshared attachment X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ec22b6086ada478d9effd6fc7c7be63937669ed8;p=friendica.git API: fix plaintext of reshared attachment 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 --- diff --git a/include/api.php b/include/api.php index 832240f716..5512dffd35 100644 --- a/include/api.php +++ b/include/api.php @@ -3184,7 +3184,6 @@ $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); @@ -3223,6 +3222,8 @@ if (isset($data["url"])) $body .= "\n".$data["url"]; + $body .= $data["after"]; + return $body; }