diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2018-11-05 11:24:43 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2018-11-05 11:24:43 -1000 |
commit | 965049969b48dfd28f8228ac7f30b1ede804768e (patch) | |
tree | cd057265120feaca627e59b8aa86195cd7f7be30 /lib | |
parent | 624ba5a8b2ddd3272e7402ba5f2183c78b3383e2 (diff) | |
download | patchfoo-965049969b48dfd28f8228ac7f30b1ede804768e.tar.gz patchfoo-965049969b48dfd28f8228ac7f30b1ede804768e.zip |
Linkify URLs in fallback message renderer
Diffstat (limited to 'lib')
-rw-r--r-- | lib/render-msg.js | 2 |
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': |