$params=array(
- urldecode($_GET["url"]),
- urldecode($_GET["title"]),
- urldecode($_GET["description"]),
+ htmlspecialchars_decode($_GET["url"]),
+ htmlspecialchars_decode($_GET["title"]),
+ htmlspecialchars_decode($_GET["description"]),
OC_User::getUser()
);
$query->execute($params);
}
$params=array(
- urldecode($_GET["url"]),
+ htmlspecialchars_decode($_GET["url"]),
OC_User::getUser()
);
// $metadata = array();
require '../bookmarksHelper.php';
+$metadata = getURLMetadata(htmlspecialchars_decode($_GET["url"]));
-$metadata = getURLMetadata(urldecode($_GET["url"]));
echo json_encode( array( 'status' => 'success', 'data' => $metadata));
AND url LIKE ?
");
-$params=array(OC_User::getUser(), urldecode($_GET["url"]));
+$params=array(OC_User::getUser(), htmlspecialchars_decode($_GET["url"]));
$bookmarks = $query->execute($params);
header( "HTTP/1.1 204 No Content" );
$CONFIG_DBTYPE = OC_Config::getValue( 'dbtype', 'sqlite' );
//Filter for tag?
-$filterTag = isset($_GET['tag']) ? '%' . urldecode($_GET['tag']) . '%' : false;
+$filterTag = isset($_GET['tag']) ? '%' . htmlspecialchars_decode($_GET['tag']) . '%' : false;
if($filterTag){
$sqlFilterTag = 'HAVING tags LIKE ?';
$params[] = $filterTag;
$page = file_get_contents($url);
@preg_match( "/<title>(.*)<\/title>/si", $page, $match );
- $metadata['title'] = htmlentities(strip_tags(@$match[1]));
+ $metadata['title'] = htmlspecialchars_decode(@$match[1]);
$meta = get_meta_tags($url);
var url = encodeEntities($('#bookmark_add_url').val())
$.ajax({
url: 'ajax/getMeta.php',
- data: 'url=' + encodeURI(url),
+ data: 'url=' + encodeURIComponent(url),
success: function(pageinfo){
$('#bookmark_add_url').val(pageinfo.data.url);
$('#bookmark_add_description').val(pageinfo.data.description);
<h2 class="bookmarks_headline"><?php echo isset($_GET["tag"]) ? 'Bookmarks with tag: ' . urldecode($_GET["tag"]) : 'All bookmarks'; ?></h2>
<div class="bookmarks_menu">
<input type="button" class="bookmarks_addBtn" value="Add Bookmark"/>
- <a class="bookmarks_addBml" href="javascript:var url = encodeURI(location.href);window.open('<?php echo (isset($_SERVER['HTTPS']) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . OC_Helper::linkTo('bookmarks', 'addBm.php'); ?>?url='+url, 'owncloud-bookmarks');" title="Drag this to your browser bookmarks and click it, when you want to bookmark a webpage.">Add page to ownCloud</a>
+ <a class="bookmarks_addBml" href="javascript:var url = encodeURIComponent(location.href);window.open('<?php echo (isset($_SERVER['HTTPS']) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . OC_Helper::linkTo('bookmarks', 'addBm.php'); ?>?url='+url, 'owncloud-bookmarks');" title="Drag this to your browser bookmarks and click it, when you want to bookmark a webpage.">Add page to ownCloud</a>
</div>
<div class="bookmarks_add">
<p><label class="bookmarks_label">Address</label><input type="text" id="bookmark_add_url" class="bookmarks_input" /></p>