diff --git a/apps/bookmarks/addBm.php b/apps/bookmarks/addBm.php index d308e8fe60..2dab33afb2 100644 --- a/apps/bookmarks/addBm.php +++ b/apps/bookmarks/addBm.php @@ -41,7 +41,7 @@ $tmpl = new OC_Template( 'bookmarks', 'addBm', 'user' ); $url = isset($_GET['url']) ? urldecode($_GET['url']) : ''; $metadata = getURLMetadata($url); -$tmpl->assign('URL', htmlentities($url)); +$tmpl->assign('URL', htmlentities($metadata['url'])); $tmpl->assign('TITLE', htmlentities($metadata['title'])); $tmpl->assign('DESCRIPTION', htmlentities($metadata['description'])); diff --git a/apps/bookmarks/ajax/addBookmark.php b/apps/bookmarks/ajax/addBookmark.php index d3d23aad26..d066b0b32f 100644 --- a/apps/bookmarks/ajax/addBookmark.php +++ b/apps/bookmarks/ajax/addBookmark.php @@ -59,7 +59,6 @@ $params=array( $query->execute($params); $b_id = OC_DB::insertid(); - if($b_id !== false) { $query = OC_DB::prepare(" INSERT INTO *PREFIX*bookmarks_tags diff --git a/apps/bookmarks/bookmarksHelper.php b/apps/bookmarks/bookmarksHelper.php index be6ac098d0..383a8ddd56 100644 --- a/apps/bookmarks/bookmarksHelper.php +++ b/apps/bookmarks/bookmarksHelper.php @@ -7,6 +7,7 @@ function getURLMetadata($url) { if(preg_match($protocols, $url) == 0) { $url = 'http://' . $url; } + $metadata['url'] = $url; $page = file_get_contents($url); @preg_match( "/