aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-11-05 11:24:43 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-11-05 11:24:43 -1000
commit965049969b48dfd28f8228ac7f30b1ede804768e (patch)
treecd057265120feaca627e59b8aa86195cd7f7be30
parent624ba5a8b2ddd3272e7402ba5f2183c78b3383e2 (diff)
downloadpatchfoo-965049969b48dfd28f8228ac7f30b1ede804768e.tar.gz
patchfoo-965049969b48dfd28f8228ac7f30b1ede804768e.zip
Linkify URLs in fallback message renderer
-rw-r--r--lib/render-msg.js2
1 files changed, 1 insertions, 1 deletions
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':