diff options
author | Christian Weiske <cweiske@cweiske.de> | 2012-01-20 15:09:39 +0100 |
---|---|---|
committer | Christian Weiske <cweiske@cweiske.de> | 2012-01-20 15:09:39 +0100 |
commit | d8ee343473c23d856f1b148067060e9edd0aa9b0 (patch) | |
tree | 300c14347f6688ff78ba1d04fd17ef449f703b5c /data/templates | |
parent | f8b7d0243ca17506aeda80f2f0e3608b382da6aa (diff) | |
download | semanticscuttle-d8ee343473c23d856f1b148067060e9edd0aa9b0.tar.gz semanticscuttle-d8ee343473c23d856f1b148067060e9edd0aa9b0.tar.bz2 |
Fix bug #3384416: Use URL with protocol in bookmarklet
Diffstat (limited to 'data/templates')
-rw-r--r-- | data/templates/default/bookmarklet.inc.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/data/templates/default/bookmarklet.inc.php b/data/templates/default/bookmarklet.inc.php index 9867745..c93f581 100644 --- a/data/templates/default/bookmarklet.inc.php +++ b/data/templates/default/bookmarklet.inc.php @@ -45,7 +45,7 @@ if (browser == "Opera") { + '<?php $popupLink = 'javascript:' . "location.href='" - . createURL('bookmarks', $GLOBALS['user']) + . addProtocolToUrl(createURL('bookmarks', $GLOBALS['user'])) . '?action=add' . "&address='+encodeURIComponent(document.location.href)+'" . "&title='+encodeURIComponent(document.title)+'" @@ -71,7 +71,7 @@ echo jsEscTitle(htmlspecialchars($link)); + '<?php $popupLink = 'javascript:' . 'open(' - . "'" . createURL('bookmarks', $GLOBALS['user']) + . "'" . addProtocolToUrl(createURL('bookmarks', $GLOBALS['user'])) . '?action=add' . '&popup=1' . "&address='+encodeURIComponent(document.location.href)+'" @@ -97,7 +97,7 @@ echo jsEscTitle(htmlspecialchars($link)); } else { $('#bookmarklet').append( '<ul>' - + '<li><a class="bookmarklet" href="javascript:x=document;a=encodeURIComponent(x.location.href);t=encodeURIComponent(x.title);d=encodeURIComponent('+selection+');location.href=\'<?php echo createURL('bookmarks', $GLOBALS['user']); ?>?action=add&address=\'+a+\'&title=\'+t+\'&description=\'+d;void 0;"><?php echo jsEscTitle(sprintf(T_('Post to %s'), $GLOBALS['sitename'])); ?><\/a><\/li>' + + '<li><a class="bookmarklet" href="javascript:x=document;a=encodeURIComponent(x.location.href);t=encodeURIComponent(x.title);d=encodeURIComponent('+selection+');location.href=\'<?php echo addProtocolToUrl(createURL('bookmarks', $GLOBALS['user'])); ?>?action=add&address=\'+a+\'&title=\'+t+\'&description=\'+d;void 0;"><?php echo jsEscTitle(sprintf(T_('Post to %s'), $GLOBALS['sitename'])); ?><\/a><\/li>' + '<li>' + '<a class="bookmarklet" href="' + 'javascript:x=document;' @@ -105,7 +105,7 @@ echo jsEscTitle(htmlspecialchars($link)); + 't=encodeURIComponent(x.title);' + 'd=encodeURIComponent('+selection+');' + 'open(' - + '\'<?php echo createURL('bookmarks', $GLOBALS['user']); ?>?action=add&popup=1&address=\'+a+\'&title=\'+t+\'&description=\'+d,\'<?php echo htmlspecialchars(jsEscTitleDouble($GLOBALS['sitename'])); ?>\',\'modal=1,status=0,scrollbars=1,toolbar=0,resizable=1,width=790,height=465,left=\'+(screen.width-790)/2+\',top=\'+(screen.height-425)/2' + + '\'<?php echo addProtocolToUrl(createURL('bookmarks', $GLOBALS['user'])); ?>?action=add&popup=1&address=\'+a+\'&title=\'+t+\'&description=\'+d,\'<?php echo htmlspecialchars(jsEscTitleDouble($GLOBALS['sitename'])); ?>\',\'modal=1,status=0,scrollbars=1,toolbar=0,resizable=1,width=790,height=465,left=\'+(screen.width-790)/2+\',top=\'+(screen.height-425)/2' + ');void 0;">' + '<?php echo jsEscTitle(sprintf(T_('Post to %s (Pop-up)'), $GLOBALS['sitename'])); ?>' + '</a>' |