aboutsummaryrefslogtreecommitdiffstats
path: root/lib/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils.js')
-rw-r--r--lib/utils.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/utils.js b/lib/utils.js
index efdb49fb..6526fe89 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -105,6 +105,9 @@ var utils = {
// trim str
str = str.replace(/^\s+|\s+$/g, '');
+ if (str[0] === '/')
+ return "file://" + str;
+
// it starts with a scheme, so it's definitely an URL
if (/^[a-z]{3,}:\/\//.test(str))
return str;