aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-02-09 11:16:02 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-02-09 11:16:02 +0000
commit31759556fb556c5a3c53914b28b6e8ef7b6c5231 (patch)
treecf8724c7d93acf0d2334c90f89b71c7fd4f62c55
parentfbac7319cf413b8cdf5e7cd1ee0d48070b484c8a (diff)
downloadsemanticscuttle-31759556fb556c5a3c53914b28b6e8ef7b6c5231.tar.gz
semanticscuttle-31759556fb556c5a3c53914b28b6e8ef7b6c5231.tar.bz2
Interface fix: allow urls into bookmarks descriptions.
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@259 b3834d28-1941-0410-a4f8-b48e95affb8f
-rw-r--r--templates/bookmarks.tpl.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/templates/bookmarks.tpl.php b/templates/bookmarks.tpl.php
index 182f65e..ff91cce 100644
--- a/templates/bookmarks.tpl.php
+++ b/templates/bookmarks.tpl.php
@@ -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)) {