Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-2379

Build artifacts with colons in their name don't work

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: All

      If I have a build artifact with a colon in the file name it is displayed
      properly, but the URL it the filename itself, without the whole http://
      blah.blah/blah.

      I will attach screen images with tooltips to show what I mean.

          [JENKINS-2379] Build artifacts with colons in their name don't work

          pgweiss added a comment -

          Created an attachment (id=384)
          The bad link (see tooltip)

          pgweiss added a comment - Created an attachment (id=384) The bad link (see tooltip)

          pgweiss added a comment -

          Created an attachment (id=385)
          The correct link (see tooltip)

          pgweiss added a comment - Created an attachment (id=385) The correct link (see tooltip)

          Alan Harder added a comment -

          Working on this.. all items there are written as href="name", ie just a relative
          pathname... it is not urlencoded, so your browser interprets stuff:morestuff as
          stuff: being the protocol for the link.. need to urlencode.

          Alan Harder added a comment - Working on this.. all items there are written as href="name", ie just a relative pathname... it is not urlencoded, so your browser interprets stuff:morestuff as stuff: being the protocol for the link.. need to urlencode.

          Alan Harder added a comment -

          started

          Alan Harder added a comment - started

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/DirectoryBrowserSupport.java
          trunk/hudson/main/core/src/main/java/hudson/model/Run.java
          trunk/hudson/main/core/src/main/resources/lib/hudson/artifactList.jelly
          trunk/hudson/main/core/src/test/java/hudson/model/RunTest.java
          http://fisheye4.cenqua.com/changelog/hudson/?cs=14106
          Log:
          [FIXED JENKINS-2379] Fix artifact archiver and workspace browser to handle filenames
          that need URL-encoding.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/model/DirectoryBrowserSupport.java trunk/hudson/main/core/src/main/java/hudson/model/Run.java trunk/hudson/main/core/src/main/resources/lib/hudson/artifactList.jelly trunk/hudson/main/core/src/test/java/hudson/model/RunTest.java http://fisheye4.cenqua.com/changelog/hudson/?cs=14106 Log: [FIXED JENKINS-2379] Fix artifact archiver and workspace browser to handle filenames that need URL-encoding.

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/Util.java
          trunk/hudson/main/core/src/main/java/hudson/model/DirectoryBrowserSupport.java
          trunk/hudson/main/core/src/main/java/hudson/model/Run.java
          trunk/hudson/main/core/src/main/resources/hudson/model/DirectoryBrowserSupport/dir.jelly
          trunk/hudson/main/core/src/main/resources/hudson/model/Run/artifacts-index.jelly
          trunk/hudson/main/core/src/main/resources/lib/hudson/artifactList.jelly
          trunk/hudson/main/core/src/test/java/hudson/UtilTest.java
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=14355
          Log:
          [FIXED JENKINS-2793] Fix from JENKINS-2379 introduced a bug for artifact/workspace
          filenames with spaces.

          • Added new Util.rawEncode which encodes the right set of characters (based on
            RFC1738) and deprecated Util.encode which only encodes non-ASCII. Unit test too.
          • Change previous fix to use Util.rawEncode instead of URLEncoder.encode
          • New fix: add h.xmlEscape call for each displayed filename in artifacts/workspace
            so & and < are encoded for HTML display
          • Add all these fixes in Run/artifacts-index.jelly which wasn't included before

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/Util.java trunk/hudson/main/core/src/main/java/hudson/model/DirectoryBrowserSupport.java trunk/hudson/main/core/src/main/java/hudson/model/Run.java trunk/hudson/main/core/src/main/resources/hudson/model/DirectoryBrowserSupport/dir.jelly trunk/hudson/main/core/src/main/resources/hudson/model/Run/artifacts-index.jelly trunk/hudson/main/core/src/main/resources/lib/hudson/artifactList.jelly trunk/hudson/main/core/src/test/java/hudson/UtilTest.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=14355 Log: [FIXED JENKINS-2793] Fix from JENKINS-2379 introduced a bug for artifact/workspace filenames with spaces. Added new Util.rawEncode which encodes the right set of characters (based on RFC1738) and deprecated Util.encode which only encodes non-ASCII. Unit test too. Change previous fix to use Util.rawEncode instead of URLEncoder.encode New fix: add h.xmlEscape call for each displayed filename in artifacts/workspace so & and < are encoded for HTML display Add all these fixes in Run/artifacts-index.jelly which wasn't included before

            mindless Alan Harder
            pgweiss pgweiss
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: