Interface fix: allow urls into bookmarks descriptions.
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@259 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
parent
fbac7319cf
commit
31759556fb
1 changed files with 3 additions and 0 deletions
|
@ -220,8 +220,11 @@ if($currenttag!= '') {
|
||||||
if ($row['bDescription'] == '') {
|
if ($row['bDescription'] == '') {
|
||||||
$bkDescription = '-';
|
$bkDescription = '-';
|
||||||
} else {
|
} else {
|
||||||
|
// Improve description display (anchors, links, ...)
|
||||||
$bkDescription = preg_replace('|\[\/.*?\]|', '', filter($row['bDescription'])); // remove final anchor
|
$bkDescription = preg_replace('|\[\/.*?\]|', '', filter($row['bDescription'])); // remove final anchor
|
||||||
$bkDescription = preg_replace('|\[(.*?)\]|', ' <b>$1 </b>', $bkDescription); // highlight starting 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";
|
echo '<div class="description">'. nl2br($bkDescription) ."</div>\n";
|
||||||
//if(!isset($hash)) {
|
//if(!isset($hash)) {
|
||||||
|
|
Loading…
Reference in a new issue