mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-10-17 05:22:29 +02:00
Treat strings containing / as URLs
In lieu of getting proper hostname detection, allow localhost/ and other similar URLs to work.
This commit is contained in:
1 parent
16eb0a1148
commit
d6238f84a4
1 file changed
+1
-1
@@ -675,7 +675,7 @@ const util = { //{{{
|
||||
|
||||
// Ok, not a valid proto. If it looks like URL-ish (foo.com/bar),
|
||||
// let Gecko figure it out.
|
||||
if (/[.]/.test(url) && !/\s/.test(url) || /^[\w-.]+:\d+(?:\/|$)/.test(url))
|
||||
if (/[.\/]/.test(url) && !/\s/.test(url) || /^[\w-.]+:\d+(?:\/|$)/.test(url))
|
||||
return url;
|
||||
|
||||
// TODO: it would be clearer if the appropriate call to
|
||||
|
||||
Reference in new issue
Block a user