git ssb

9+

cel / ssb-viewer



Commit 7b1296a17c686246a78705ff9f4d90b54c294c86

Allow any ref to be url-encoded

cel committed on 4/16/2017, 5:47:55 PM
Parent: 187cf5d8c031e8ecdfeb9cecd02b4cb1c42f5105

Files changed

index.jschanged
index.jsView
@@ -88,10 +88,13 @@
8888
8989 if (req.url.startsWith('/user-feed/')) return serveUserFeed(req, res, m[4])
9090 else if (req.url.startsWith('/channel/')) return serveChannel(req, res, m[4])
9191
92 + if (m[2] && m[2].length === 3) {
93 + m[1] = decodeURIComponent(m[1])
94 + m[2] = m[1][0]
95 + }
9296 switch (m[2]) {
93- case '%25': m[2] = '%'; m[1] = decodeURIComponent(m[1])
9497 case '%': return serveId(req, res, m[1], m[3], m[5])
9598 case '@': return serveFeed(req, res, m[1], m[3], m[5])
9699 case '&': return serveBlob(req, res, sbot, m[1])
97100 default: return servePath(req, res, m[4])

Built with git-ssb-web