Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-18372

Image Filenames with Parenthesis used inside Issue Tracker Text Editor Fail

    XMLWordPrintable

Details

    Description

      Your system also does not accept attachment images that inlcude (1) (i.e () parentheses inside the Issue Tracker description text field - very often I have files I am using which have the same file name so my PC auto increments (i.e photo.png, photo(1).png, photo(2).png) - your generated URL string does not allow for the parenthesis to be included in the filename meaning I have to rename the file every time!

      Steps:

      1. Create an Issue
      2. Tap the Image icon in toolbar editor
      3. Select an image that includes parenthesis - i.e IMG_6676(1).PNG
      4. Fill out some test text inside the Issue and press "Create Issue"
      5. You will receive the following result after the issue is posted - see screen shot:

      I think the reason for this might be that parenthesis have not been utilised correctly in the initial string to handle when a file has parenthesis in the filename. Here is the string you are currently using:

      #!python
      
      ![IMG_7760(1).PNG](https://bitbucket.org/repo/******/images/1195010736-IMG_7760(1).PNG)
      

      The parenthesis after 1) is ending the string causing .PNG) to be displayed after the issue is Created and hence breaking the URL to the correct image.

      I think a quick fix would be to detect ( and ) in the file name and auto change ( to %28 and ) to %29 in the string name - this works and fixes the issues but you might have a cleaner solution.

      For example the above string would change to:

      #!python
      
      ![IMG_7760(1).PNG](https://bitbucket.org/repo/******/images/1195010736-IMG_7760%281%29.PNG)
      

      After making this update to the string name as displayed above the image now displays correctly and the URL is not broken.

      As mentioned above it should be simple to fix and would mean I (and I am sure many others!!) don't have to rename images every time we come across a parenthesis in the image name

      Attachments

        Activity

          People

            Unassigned Unassigned
            d8357dce50db ShaneTm
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: