From: ArthurHoaro Date: Thu, 25 May 2017 14:45:08 +0000 (+0200) Subject: Selection is now limited to 2k characters using bookmarklets X-Git-Tag: v0.9.1~1^2~25^2~1 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=d6aec9e60b5dad7b6e64b62dc4aa8a9f403634dc;hp=3e395a6bc63cba16b0772a382f6cbac0ce4ab906;p=github%2Fshaarli%2FShaarli.git Selection is now limited to 2k characters using bookmarklets to avoid having too large URL Fixes #528 --- diff --git a/tpl/default/tools.html b/tpl/default/tools.html index 6951ad28..bf6b6ca3 100644 --- a/tpl/default/tools.html +++ b/tpl/default/tools.html @@ -75,7 +75,7 @@ window.open( '{$pageabsaddr}?post='%20+%20encodeURIComponent(url)+ '&title='%20+%20encodeURIComponent(title)+ - '&description='%20+%20encodeURIComponent(document.getSelection())+ + '&description='%20+%20encodeURIComponent(document.getSelection().toString().substr(0, 2000))+ '&source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1' ); } @@ -91,7 +91,7 @@ function(){ window.open( '{$pageabsaddr}?private=1&post='+ - '&description='%20+%20encodeURIComponent(document.getSelection())+ + '&description='%20+%20encodeURIComponent(document.getSelection().toString().substr(0, 2000))+ '&source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1' ); }