Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 445680f

Browse files
committed
fix(nodeserver): properly escape all, not just first char
1 parent bf729d5 commit 445680f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/nodeserver/server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ StaticServlet.MimeMap = {
8585

8686
StaticServlet.prototype.handleRequest = function(req, res) {
8787
var self = this;
88-
var path = ('./' + req.url.pathname).replace('//','/').replace(/%(..)/, function(match, hex){
88+
var path = ('./' + req.url.pathname).replace('//','/').replace(/%(..)/g, function(match, hex){
8989
return String.fromCharCode(parseInt(hex, 16));
9090
});
9191
var parts = path.split('/');

0 commit comments

Comments
 (0)