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

fixed view-source:

This commit is contained in:
Martin Stubenschrott
2008-12-08 19:07:12 +01:00
parent 272f699732
commit 21e2219819

View File

@@ -484,7 +484,7 @@ const util = { //{{{
// if the string doesn't look like a valid URL (i.e. contains a space // if the string doesn't look like a valid URL (i.e. contains a space
// or starts with a known protocol try opening it with a search engine // or starts with a known protocol try opening it with a search engine
// or keyword bookmark // or keyword bookmark
let proto = url.match(/^(\w+):/); let proto = url.match(/^([-\w]+):/);
if (/\s/.test(url) || !proto || !Components.classes["@mozilla.org/network/protocol;1?name=" + proto[1]]) if (/\s/.test(url) || !proto || !Components.classes["@mozilla.org/network/protocol;1?name=" + proto[1]])
{ {
// TODO: it would be clearer if the appropriate call to // TODO: it would be clearer if the appropriate call to