From c1ad7acfb97489c44c52b6955e930c3466630284 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 7 Feb 2021 21:09:27 +0300 Subject: bookmarklet: encode URL properly so special characters won't get lost --- plugins/bookmarklets/init.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/bookmarklets/init.php') diff --git a/plugins/bookmarklets/init.php b/plugins/bookmarklets/init.php index 3b13ef10d..fa1bb8cf6 100644 --- a/plugins/bookmarklets/init.php +++ b/plugins/bookmarklets/init.php @@ -19,7 +19,7 @@ class Bookmarklets extends Plugin { function hook_prefs_tab($args) { if ($args == "prefFeeds") { - print "
bookmark ".__('Bookmarklets')."\">"; print "

" . __("Drag the link below to your browser toolbar, open the feed you're interested in in your browser and click on the link to subscribe to it.") . "

"; @@ -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 "