Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing encode - URI's with spaces don't work. Single line patch required below. #390

Open
CastleSoft opened this issue Sep 22, 2017 · 2 comments
Labels
pourparler Needs to debate about that

Comments

@CastleSoft
Copy link

parse: function() {

parse: function() {
// AJT 2017-09-22 - Fix URI
this.uris = encodeURI(this.uris);
// AJT 2017-09-22 - Fix URI

  return _
    .chain(this.uris.trim().split(/\r?\n/g))
    .map(function(d) {
      return _(d)
        .replace(/["'][^"']*["']/g, function(c) {
          return c.replace(/%/g,'%25').replace(/ /g,'%20');
        })
        .trim()
        .split(/\s+/g)
        .map(function(c) {
          return c.replace(/%20/g,' ').replace(/%25/g,'%').replace(/["']/g,'');
        });
    })
    .filter(function(d) { return d.length })
    .value();
}
@no1xsyzy
Copy link
Contributor

please format as Markdown, or just create pull requests on your own.

@no1xsyzy
Copy link
Contributor

BTW, don't put comment about who edited the part in pull request, git blame will do that, like this, latest edit to each line are shown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pourparler Needs to debate about that
Projects
None yet
Development

No branches or pull requests

3 participants