]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
Interface fix: allow urls into bookmarks descriptions.
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>
Mon, 9 Feb 2009 11:16:02 +0000 (11:16 +0000)
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>
Mon, 9 Feb 2009 11:16:02 +0000 (11:16 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@259 b3834d28-1941-0410-a4f8-b48e95affb8f

templates/bookmarks.tpl.php

index 182f65edeb5f36f89ae47c329fd9983cc6e8d65c..ff91cce207863b83d5f500215cafa7d57657f825 100644 (file)
@@ -220,8 +220,11 @@ if($currenttag!= '') {
                if ($row['bDescription'] == '') {
                        $bkDescription = '-';
                } else {
+                       // Improve description display (anchors, links, ...)
                        $bkDescription = preg_replace('|\[\/.*?\]|', '', filter($row['bDescription'])); // remove final anchor
                        $bkDescription = preg_replace('|\[(.*?)\]|', ' <b>$1 </b>', $bkDescription); // highlight starting anchor
+                       $bkDescription = preg_replace('@((http|https|ftp)://.*?)( |\r|$)@', '<a href="$1">$1</a>$3', $bkDescription); // make url clickable
+                       
                }
                echo '<div class="description">'. nl2br($bkDescription) ."</div>\n";
                //if(!isset($hash)) {