]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
URL is now encoded
authorNicolas Lœuillet <nicolas.loeuillet@gmail.com>
Fri, 2 Aug 2013 09:48:57 +0000 (11:48 +0200)
committerNicolas Lœuillet <nicolas.loeuillet@gmail.com>
Fri, 2 Aug 2013 09:48:57 +0000 (11:48 +0200)
inc/functions.php
tpl/config.html

index 34ecf510ad3f02d13120f1abc762306983f79808..ee26fbaae6daa28cf56d5dd0b9e1fe54877e49f1 100644 (file)
@@ -342,6 +342,8 @@ function action_to_do($action, $url, $id = 0)
             if ($url == '')
                 continue;
 
+            $url = base64_decode($url);
+            error_log(print_r($url, TRUE));
             if (MyTool::isUrl($url)) {
                 if($parametres_url = prepare_url($url)) {
                     if ($store->add($url, $parametres_url['title'], $parametres_url['content'])) {
index 43c0104cf67a3c456ff6759ecc8f956402aee8c8..2c7df4f74d3868d7e067d33aeabda94fd5a0b49b 100644 (file)
@@ -2,7 +2,7 @@
                <h2>Bookmarklet</h2>
                <p>Thanks to the bookmarklet, you will be able to easily add a link to your poche. If you don't know how use a bookmarklet, <a href="http://support.mozilla.org/en-US/kb/bookmarklets-perform-common-web-page-tasks">have a look here</a>.</p>
                <p>Drag & drop this link to your bookmarks bar and have fun with poche.</p>
-                <p><a ondragend="this.click();" style="cursor: move; border: 1px dashed grey; background: white;" title="i am a bookmarklet, use me !" href="javascript:if(top['bookmarklet-url@inthepoche.com']){top['bookmarklet-url@inthepoche.com'];}else{(function(){var%20url%20=%20location.href%20||%20url;window.open('{$poche_url}?action=add&url='%20+%20encodeURIComponent(url),'_self');})();void(0);}">poche it !</a></p>
+                <p><a ondragend="this.click();" style="cursor: move; border: 1px dashed grey; background: white;" title="i am a bookmarklet, use me !" href="javascript:if(top['bookmarklet-url@inthepoche.com']){top['bookmarklet-url@inthepoche.com'];}else{(function(){var%20url%20=%20location.href%20||%20url;window.open('{$poche_url}?action=add&url='%20+%20btoa(url),'_self');})();void(0);}">poche it !</a></p>
 
                 <h2>Password</h2>
                    <form method="post" action="?config" name="loginform">