From 680fe89fa869c05f5d73c2146a30aa594fe29a60 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 19 Feb 2012 19:42:30 +0100 Subject: [PATCH] SN addon: added handling for [bookmark] tag --- statusnet/statusnet.php | 1 + 1 file changed, 1 insertion(+) 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