aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-07-31 08:49:03 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-07-31 08:49:03 -1000
commit3f4a0ab33dbb1adb4f5983e2b437330d2eb82a06 (patch)
tree1448c9f3451ff67ac507ff736637c86707ee633d
parent8fd6613c73b3cc03e594c3a4ad89e3303cfd5131 (diff)
downloadpatchfoo-3f4a0ab33dbb1adb4f5983e2b437330d2eb82a06.tar.gz
patchfoo-3f4a0ab33dbb1adb4f5983e2b437330d2eb82a06.zip
Fix linkifying private blob links
-rw-r--r--lib/render.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/render.js b/lib/render.js
index e9fae80..a967ee4 100644
--- a/lib/render.js
+++ b/lib/render.js
@@ -228,8 +228,12 @@ Render.prototype.toUrl = function (href) {
var hash = parts.shift()
var key = parts.shift()
var fragment = parts.join('#')
+ parts = hash.split('?')
+ hash = parts.shift()
+ query = parts.join('?')
if (!u.isRef(hash)) return false
return this.opts.blob_base + hash
+ + (query ? '?' + query : '')
+ (key ? encodeURIComponent('#' + key) : '')
+ (fragment ? '#' + fragment : '')
case '#': return this.opts.base + 'channel/' +