mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-27 15:04:02 +00:00
fix(nodeserver): properly escape all, not just first char
This commit is contained in:
parent
bf729d550b
commit
445680f601
1 changed files with 1 additions and 1 deletions
|
|
@ -85,7 +85,7 @@ StaticServlet.MimeMap = {
|
||||||
|
|
||||||
StaticServlet.prototype.handleRequest = function(req, res) {
|
StaticServlet.prototype.handleRequest = function(req, res) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var path = ('./' + req.url.pathname).replace('//','/').replace(/%(..)/, function(match, hex){
|
var path = ('./' + req.url.pathname).replace('//','/').replace(/%(..)/g, function(match, hex){
|
||||||
return String.fromCharCode(parseInt(hex, 16));
|
return String.fromCharCode(parseInt(hex, 16));
|
||||||
});
|
});
|
||||||
var parts = path.split('/');
|
var parts = path.split('/');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue