From 965049969b48dfd28f8228ac7f30b1ede804768e Mon Sep 17 00:00:00 2001 From: cel Date: Mon, 5 Nov 2018 11:24:43 -1000 Subject: Linkify URLs in fallback message renderer --- lib/render-msg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/render-msg.js b/lib/render-msg.js index 56db7d9..857c2d5 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -875,7 +875,7 @@ RenderMsg.prototype.valueTable = function (val, depth, cb) { return el case 'string': if (val[0] === '#') return cb(null, h('a', {href: self.toUrl('/channel/' + val.substr(1))}, val)) - if (u.isRef(val)) return self.link1(val, cb) + if (u.isRef(val) || /^[a-z][a-z0-9]*:\/\/\S+$/.test(val)) return self.link1(val, cb) if (/^ssb-blob:\/\//.test(val)) return cb(), h('a', {href: self.toUrl(val)}, val) return cb(), self.linkify(val) case 'boolean': -- cgit v1.2.3