mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-22 08:25:45 +01:00
Minor cleanup.
This commit is contained in:
@@ -739,7 +739,7 @@ function Bookmarks() //{{{
|
|||||||
if (!shortcutURL)
|
if (!shortcutURL)
|
||||||
return [url, null];
|
return [url, null];
|
||||||
|
|
||||||
let data = unescape(postData || "");
|
let data = window.unescape(postData || "");
|
||||||
if (/%s/i.test(shortcutURL) || /%s/i.test(data))
|
if (/%s/i.test(shortcutURL) || /%s/i.test(data))
|
||||||
{
|
{
|
||||||
var charset = "";
|
var charset = "";
|
||||||
@@ -764,9 +764,7 @@ function Bookmarks() //{{{
|
|||||||
postData = window.getPostDataStream(data, param, encodedParam, "application/x-www-form-urlencoded");
|
postData = window.getPostDataStream(data, param, encodedParam, "application/x-www-form-urlencoded");
|
||||||
}
|
}
|
||||||
else if (param)
|
else if (param)
|
||||||
{
|
return [shortcutURL, null];
|
||||||
return [url, null];
|
|
||||||
}
|
|
||||||
return [shortcutURL, postData];
|
return [shortcutURL, postData];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2140,10 +2140,7 @@ function StatusLine() //{{{
|
|||||||
// ripped from Firefox; modified
|
// ripped from Firefox; modified
|
||||||
function losslessDecodeURI(url) {
|
function losslessDecodeURI(url) {
|
||||||
// 1. decodeURI decodes %25 to %, which creates unintended
|
// 1. decodeURI decodes %25 to %, which creates unintended
|
||||||
// encoding sequences. Re-encode it, unless it's part of
|
// encoding sequences.
|
||||||
// a sequence that survived decodeURI, i.e. one for:
|
|
||||||
// ';', '/', '?', ':', '@', '&', '=', '+', '$', ',', '#'
|
|
||||||
// (RFC 3987 section 3.2)
|
|
||||||
url = url.split("%25").map(decodeURI).join("%25");
|
url = url.split("%25").map(decodeURI).join("%25");
|
||||||
// 2. Re-encode whitespace so that it doesn't get eaten away
|
// 2. Re-encode whitespace so that it doesn't get eaten away
|
||||||
// by the location bar (bug 410726).
|
// by the location bar (bug 410726).
|
||||||
|
|||||||
Reference in New Issue
Block a user