1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 21:17:58 +01:00

Skip leading white space when proto matching.

--HG--
extra : rebase_source : ad2bc00283827198b0cab54400a1c1b8d323a7a3
This commit is contained in:
Kris Maglione
2014-07-29 22:15:01 -07:00
parent af64ba27db
commit 48fcb93bcd

View File

@@ -2312,7 +2312,7 @@ var Buffer = Module("Buffer", {
let url = dactyl.clipboardRead();
dactyl.assert(url, _("error.clipboardEmpty"));
let proto = /^([-\w]+):/.exec(url);
let proto = /^\s*([-\w]+):/.exec(url);
if (proto && services.PROTOCOL + proto[1] in Cc && !RegExp(options["urlseparator"]).test(url))
return url.replace(/\s+/g, "");
return url;