Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-4824

URLCleanup.js only strips whitespace from the front of strings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • Bug fixes, 2012-06-11
    • None
    • None
    • None

      And I quote:

      self.cleanUrl = function (sourceType, dirtyURL) {
      dirtyURL = dirtyURL.replace(/^\s+/, '');

      for (var group in MB.constants.CLEANUPS) {
      if(!MB.constants.CLEANUPS.hasOwnProperty(group))

      { continue; }

      var cleanup = MB.constants.CLEANUPS[group];
      if(!cleanup.hasOwnProperty('clean') || !cleanup.match.test(dirtyURL))
      continue;

      return cleanup.clean(dirtyURL);
      }
      return dirtyURL;
      };

      Presumably needs a line:

      dirtyURL = dirtyURL.replace(/\s+$/, '');

      or some way of combining that into the existing line

            reosarevok Nicolás Tamargo
            ianmcorvidae Ian McEwen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                Bug fixes, 2012-06-11