From 12ea6710adc39186a60eda8abd2b472a8844c12a Mon Sep 17 00:00:00 2001 From: no1xsyzy Date: Thu, 27 Jul 2017 10:26:13 +0800 Subject: [PATCH] Fixes #302 --- js/ctrls/modal.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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(); }