aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/render-msg.js1
-rw-r--r--lib/render.js3
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index 3b498e0..92f8531 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -800,6 +800,7 @@ RenderMsg.prototype.valueTable = function (val, depth, cb) {
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 (/^ssb-blob:\/\//.test(val)) return cb(), h('a', {href: self.toUrl(val)}, val)
return cb(), self.linkify(val)
case 'boolean':
return cb(), h('input', {
diff --git a/lib/render.js b/lib/render.js
index 95c8c50..df4f112 100644
--- a/lib/render.js
+++ b/lib/render.js
@@ -186,6 +186,9 @@ Render.prototype.toUrl = function (href) {
var mentions = this._mentions
if (mentions && href in this._mentions) href = this._mentions[href]
if (/^ssb:\/\//.test(href)) href = href.substr(6)
+ if (/^ssb-blob:\/\//.test(href)) {
+ return this.opts.base + 'zip/' + href.substr(11)
+ }
switch (href[0]) {
case '%':
if (!u.isRef(href)) return false