aboutsummaryrefslogtreecommitdiff
path: root/lib/render.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/render.js')
-rw-r--r--lib/render.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/render.js b/lib/render.js
index f68c8aa..7af5149 100644
--- a/lib/render.js
+++ b/lib/render.js
@@ -77,6 +77,8 @@ Render.prototype.markdown = function (text, mentions) {
}
Render.prototype.imageUrl = function (ref) {
+ var m = /^blobstore:(.*)/.exec(ref)
+ if (m) ref = m[1]
return this.opts.img_base + ref
}
@@ -93,6 +95,8 @@ Render.prototype.toUrl = function (href) {
case '#': return this.opts.base + encodeURIComponent(href)
case '/': return this.opts.base + href.substr(1)
}
+ var m = /^blobstore:(.*)/.exec(href)
+ if (m) return this.opts.blob_base + m[1]
if (/^javascript:/.test(href)) return false
return href
}