bookmarklet: encode URL properly so special characters won't get lost

master
Andrew Dolgov 4 years ago
parent b4cbc792cc
commit 983a874ddd

@ -28,7 +28,7 @@ class Bookmarklets extends Plugin {
$confirm_str = str_replace("'", "\'", __('Subscribe to %s in Tiny Tiny RSS?'));
$bm_url = htmlspecialchars("javascript:{if(confirm('$confirm_str'.replace('%s',window.location.href)))window.location.href='$bm_subscribe_url'+window.location.href}");
$bm_url = htmlspecialchars("javascript:{if(confirm('$confirm_str'.replace('%s',window.location.href)))window.location.href='$bm_subscribe_url'+encodeURIComponent(window.location.href)}");
print "<p><label class='dijitButton'>";
print "<a href=\"$bm_url\">" . __('Subscribe in Tiny Tiny RSS'). "</a>";

Loading…
Cancel
Save