aboutsummaryrefslogtreecommitdiff
path: root/lib/serve.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-09-24 19:36:47 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-09-24 19:37:18 -1000
commit47442aa20e3a4738708249618caf3c32fbea07bb (patch)
treebdbdc2b50a8d554c04ff913ec9f10f1c940b1e58 /lib/serve.js
parente9e878093f895aedaf1982f94f0f75f0fd113d77 (diff)
downloadpatchfoo-47442aa20e3a4738708249618caf3c32fbea07bb.tar.gz
patchfoo-47442aa20e3a4738708249618caf3c32fbea07bb.zip
Handle unencoded web links
Diffstat (limited to 'lib/serve.js')
-rw-r--r--lib/serve.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/serve.js b/lib/serve.js
index 951daea..f825ed7 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -2873,7 +2873,9 @@ Serve.prototype.zip = function (url) {
Serve.prototype.web = function (url) {
var self = this
- var id = decodeURIComponent(url.substr(1))
+ var id = url.substr(1)
+ try { id = decodeURIComponent(id) }
+ catch(e) {}
var components = url.split('/')
if (components[0] === '') components.shift()