[Pkg-owncloud-commits] [owncloud] 34/75: Tweak bookmarklet to not change the current page. Correct encoding when add bookmark

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:08:35 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v3.0.1
in repository owncloud.

commit 268c6cfaa7da382d0fc1cb558d9120214a5e05df
Author: Brice Maron <brice at bmaron.net>
Date:   Tue Oct 18 23:27:53 2011 +0200

    Tweak bookmarklet to not change the current page. Correct encoding when add bookmark
---
 apps/bookmarks/addBm.php              |    4 ++--
 apps/bookmarks/templates/settings.php |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/apps/bookmarks/addBm.php b/apps/bookmarks/addBm.php
index a7cdcee..62ad582 100644
--- a/apps/bookmarks/addBm.php
+++ b/apps/bookmarks/addBm.php
@@ -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();
diff --git a/apps/bookmarks/templates/settings.php b/apps/bookmarks/templates/settings.php
index b7da441..97b6b25 100644
--- a/apps/bookmarks/templates/settings.php
+++ b/apps/bookmarks/templates/settings.php
@@ -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>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list