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

URLCleanup.js only strips whitespace from the front of strings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Bug fixes, 2012-06-11
    • Component/s: None
    • Labels:
      None

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                Bug fixes, 2012-06-11