mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 19:57:58 +01:00
fix space stripping of urls
This commit is contained in:
@@ -671,7 +671,7 @@ const util = { //{{{
|
|||||||
let proto = url.match(/^([-\w]+):/);
|
let proto = url.match(/^([-\w]+):/);
|
||||||
if (proto && Cc["@mozilla.org/network/protocol;1?name=" + proto[1]])
|
if (proto && Cc["@mozilla.org/network/protocol;1?name=" + proto[1]])
|
||||||
// Handle as URL, but remove spaces. Useful for copied/'p'asted URLs.
|
// Handle as URL, but remove spaces. Useful for copied/'p'asted URLs.
|
||||||
return url.replace(/\s+/g, "");
|
return url.replace(/\s*\n+\s*/g, "");
|
||||||
|
|
||||||
// Ok, not a valid proto. If it looks like URL-ish (foo.com/bar),
|
// Ok, not a valid proto. If it looks like URL-ish (foo.com/bar),
|
||||||
// let Gecko figure it out.
|
// let Gecko figure it out.
|
||||||
|
|||||||
Reference in New Issue
Block a user