mirror of
https://github.com/owncloud/bookmarks.git
synced 2025-01-31 01:52:11 +01:00
Tweak bookmarklet to not change the current page. Correct encoding when add bookmark
This commit is contained in:
parent
ab65f73ab3
commit
59c8de33da
@ -39,7 +39,7 @@ $tmpl = new OC_Template( 'bookmarks', 'addBm', 'user' );
|
||||
$url = isset($_GET['url']) ? urldecode($_GET['url']) : '';
|
||||
$metadata = getURLMetadata($url);
|
||||
|
||||
$tmpl->assign('URL', htmlentities($metadata['url']));
|
||||
$tmpl->assign('TITLE', htmlentities($metadata['title']));
|
||||
$tmpl->assign('URL', htmlentities($metadata['url'],ENT_COMPAT,'utf-8'));
|
||||
$tmpl->assign('TITLE', htmlentities($metadata['title'],ENT_COMPAT,'utf-8'));
|
||||
|
||||
$tmpl->printPage();
|
||||
|
@ -8,7 +8,7 @@
|
||||
?>
|
||||
<form id="bookmarks">
|
||||
<fieldset class="personalblock">
|
||||
<span class="bold"><?php echo $l->t('Bookmarklet:');?></span> <a class="bookmarks_addBml" href="javascript:var url = encodeURIComponent(location.href);window.open('<?php echo OC_Helper::linkTo('bookmarks', 'addBm.php', null, true); ?>?url='+url, 'owncloud-bookmarks');"><?php echo $l->t('Add page to ownCloud'); ?></a>
|
||||
<span class="bold"><?php echo $l->t('Bookmarklet:');?></span> <a class="bookmarks_addBml" href="javascript:(function(){url=encodeURIComponent(location.href);window.open('<?php echo OC_Helper::linkTo('bookmarks', 'addBm.php', null, true); ?>?url='+url, 'owncloud-bookmarks') })()"><?php echo $l->t('Add page to ownCloud'); ?></a>
|
||||
<br/><em><?php echo $l->t('Drag this to your browser bookmarks and click it, when you want to bookmark a webpage.'); ?></em><br />
|
||||
</fieldset>
|
||||
</form>
|
||||
|
Loading…
x
Reference in New Issue
Block a user