Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-7932

XWikiAttachment setFilename() changes "+" to a space after it already should be URL decoded

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • 3.5, 4.0, 4.1, 4.2-milestone-1
    • Old Core
    • None
    • Unknown

    Description

      com.xpn.xwiki.doc.XWikiAttachment changes the filename from the given name that should be already URL decoded:

      filename.replaceAll("
      +", " ");

      The filename should be already url decoded by this point, so this substitution should not be needed.

          public void setFilename(String filename)
          {
              filename = filename.replaceAll("\\+", " ");
              if (!filename.equals(this.filename)) {
                  setMetaDataDirty(true);
                  this.filename = filename;
              }
              this.reference = null;
          }
      

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              jamiem Jamie Maher
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: