From: Tobias Diekershoff Date: Sun, 19 Feb 2012 18:42:30 +0000 (+0100) Subject: SN addon: added handling for [bookmark] tag X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=680fe89fa869c05f5d73c2146a30aa594fe29a60;p=friendica-addons.git SN addon: added handling for [bookmark] tag --- diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index 54aca484..66a1db81 100755 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -412,6 +412,7 @@ function statusnet_post_hook(&$a,&$b) { // $tmp = preg_replace( '/#\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', '#$2', $tmp); // preserve links to webpages $tmp = preg_replace( '/\[url\=(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)\](\w+.*?)\[\/url\]/i', '$2 $1', $tmp); + $tmp = preg_replace( '/\[bookmark\=(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)\](\w+.*?)\[\/bookmark\]/i', '$2 $1', $tmp); // TODO apply the shortener to the URLs in the releyed dent $msg = strip_tags(bbcode($tmp)); // quotes not working - let's try this