aboutsummaryrefslogtreecommitdiff
path: root/lib/serve.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/serve.js')
-rw-r--r--lib/serve.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/serve.js b/lib/serve.js
index a68d815..0e497ea 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -32,7 +32,7 @@ module.exports = Serve
var emojiDir = path.join(require.resolve('emoji-named-characters'), '../pngs')
var hlCssDir = path.join(require.resolve('highlight.js'), '../../styles')
-var urlIdRegex = /^(?:\/+(([%&@]|%25)(?:[A-Za-z0-9\/+]|%2[Ff]|%2[Bb]){43}(?:=|%3D)\.(?:sha256|ed25519))([^?]*)?|(\/.*?))(?:\?(.*))?$/
+var urlIdRegex = /^(?:\/+(([%&@]|%25|%26)(?:[A-Za-z0-9\/+]|%2[Ff]|%2[Bb]){43}(?:=|%3D)\.(?:sha256|ed25519))([^?]*)?|(\/.*?))(?:\?(.*))?$/
function ctype(name) {
switch (name && /[^.\/]*$/.exec(name)[0] || 'html') {
@@ -282,6 +282,7 @@ Serve.prototype.handle = function () {
case '%25': m[2] = '%'; m[1] = decodeURIComponent(m[1])
case '%': return this.id(m[1], m[3])
case '@': return this.userFeed(m[1], m[3])
+ case '%26': m[2] = '%'; m[1] = decodeURIComponent(m[1])
case '&': return this.blob(m[1], m[3])
default: return this.path(m[4])
}