summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)) {