aboutsummaryrefslogtreecommitdiff
path: root/lib/render.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-05-06 15:15:56 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-05-06 15:15:56 -1000
commitd81825f4b4da83bd0376ac916107f425872eee7b (patch)
tree7219b91fcbb3a7f72536ef0e23442ee978f28241 /lib/render.js
parenta06789afcc5b53c34d19d2d9d35c3b91c705d91c (diff)
downloadpatchfoo-d81825f4b4da83bd0376ac916107f425872eee7b.tar.gz
patchfoo-d81825f4b4da83bd0376ac916107f425872eee7b.zip
Serve channels under /channel/ instead of /%23
Diffstat (limited to 'lib/render.js')
-rw-r--r--lib/render.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/render.js b/lib/render.js
index 316ad2f..36dba2f 100644
--- a/lib/render.js
+++ b/lib/render.js
@@ -146,7 +146,8 @@ Render.prototype.toUrl = function (href) {
case '&':
if (!u.isRef(href)) return false
return this.opts.blob_base + href
- case '#': return this.opts.base + encodeURIComponent(href)
+ case '#': return this.opts.base + 'channel/' +
+ encodeURIComponent(href.substr(1))
case '/': return this.opts.base + href.substr(1)
case '?': return this.opts.base + 'search?q=' + encodeURIComponent(href)
}