From 985fd15dd1ed350ac505eccba96d9de072db45e0 Mon Sep 17 00:00:00 2001 From: cel Date: Mon, 9 Sep 2019 19:53:47 -0400 Subject: Handle markdown links missing URI scheme --- lib/render.js | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') 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 } -- cgit v1.2.3