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

Fix broken JS completion.

--HG--
branch : testing
This commit is contained in:
Kris Maglione
2010-06-03 20:24:16 -04:00
parent b6267c4f19
commit a6f90714e4
11 changed files with 51 additions and 53 deletions

View File

@@ -726,7 +726,7 @@ const Util = Module("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 (/^[a-zA-Z0-9-.]+(?:\/|$)/.test(url) && /[.\/]/.test(url) && !/\s/.test(url) || /^[a-zA-Z0-9-.]+:\d+(?:\/|$)/.test(url))
return url;
// TODO: it would be clearer if the appropriate call to