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
This commit is contained in:
fabrixxm 2016-07-15 16:53:30 +02:00
parent d68c09e428
commit ec22b6086a

View File

@ -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;
}