summaryrefslogtreecommitdiff
path: root/www/bookmarks.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/bookmarks.php')
-rw-r--r--www/bookmarks.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/www/bookmarks.php b/www/bookmarks.php
index 3b1d50a..ee0612e 100644
--- a/www/bookmarks.php
+++ b/www/bookmarks.php
@@ -135,8 +135,11 @@ if ($userservice->isLoggedOn() && POST_SUBMITTED != '') {
$templatename = 'editbookmark.tpl';
} else {
$address = trim(POST_ADDRESS);
- // If the bookmark exists already, edit the original
- if ($bookmarkservice->bookmarkExists($address, $currentUserID)) {
+ if (!SemanticScuttle_Model_Bookmark::isValidUrl($address)) {
+ $tplVars['error'] = T_('This bookmark URL may not be added');
+ $templatename = 'editbookmark.tpl';
+ } else if ($bookmarkservice->bookmarkExists($address, $currentUserID)) {
+ // If the bookmark exists already, edit the original
$bookmark = $bookmarkservice->getBookmarkByAddress($address);
header('Location: '. createURL('edit', $bookmark['bId']));
exit();