]> git.mxchange.org Git - friendica-addons.git/commitdiff
SN addon: added handling for [bookmark] tag
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 19 Feb 2012 18:42:30 +0000 (19:42 +0100)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 19 Feb 2012 18:42:30 +0000 (19:42 +0100)
statusnet/statusnet.php

index 54aca484bb6e2d3e82fb4ffeee8cde668e83e9cb..66a1db814bd23af091e5e48867e7c32f9552ab1d 100755 (executable)
@@ -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