aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2019-09-09 19:53:47 -0400
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2019-09-09 19:53:47 -0400
commit985fd15dd1ed350ac505eccba96d9de072db45e0 (patch)
tree2c4f7b146de53c99a3637c4c26201fbf075c8e2b
parenta217ecc59bdda0607c7bd84c61a499e1ba771a1d (diff)
downloadpatchfoo-985fd15dd1ed350ac505eccba96d9de072db45e0.tar.gz
patchfoo-985fd15dd1ed350ac505eccba96d9de072db45e0.zip
Handle markdown links missing URI scheme
-rw-r--r--lib/render.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/render.js b/lib/render.js
index e246923..c470ff2 100644
--- a/lib/render.js
+++ b/lib/render.js
@@ -275,6 +275,7 @@ Render.prototype.toUrl = function (href) {
var m = /^blobstore:(.*)/.exec(href)
if (m) return this.opts.blob_base + m[1]
if (/^javascript:/.test(href)) return false
+ if (!/^[a-z0-9]*:/.test(href)) return 'http://' + href
return href
}