diff --git a/js/ctrls/modal.js b/js/ctrls/modal.js index 3177c3d..0387038 100644 --- a/js/ctrls/modal.js +++ b/js/ctrls/modal.js @@ -79,7 +79,17 @@ angular parse: function() { return _ .chain(this.uris.trim().split(/\r?\n/g)) - .map(function(d) { return d.trim().split(/\s+/g) }) + .map(function(d) { + return _(d) + .replace(/("[^"]*")/g, function(c) { + return c.replace('%','%25').replace(' ','%20'); + }) + .trim() + .split(/\s+/g) + .map(function(c) { + return c.replace('%20',' ').replace('%25','%').replace(/"/g,''); + }); + }) .filter(function(d) { return d.length }) .value(); }