$recycle = html_entity_decode("◌ ", ENT_QUOTES, 'UTF-8');
$body = preg_replace( '/'.$recycle.'\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', "\n", $body);
+ // remove the share element
+ $body = preg_replace("/\[share(.*?)\](.*?)\[\/share\]/ism","\n\n$2\n\n",$body);
+
// At first convert the text to html
$html = bbcode($body, false, false);
$msg = substr($msg, 0, -1);
$pos = strrpos($msg, "\n");
if ($pos > 0)
- $msg = substr($msg, 0, $pos-1);
+ $msg = substr($msg, 0, $pos);
else if ($lastchar != "\n")
$msg = substr($msg, 0, -3)."...";
}