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

Link to filenames with spaces in Bitbucket Markdown (BB-15884)

      Let's say I have a README.md and I'd like to create a link to a file that contains spaces in its name, file with spaces.md. I'd like to be able to jump to the file's source code.

      /
       -- README.md
       -- File with spaces.md
      

      After inspecting the element in the browser, I figured out what the href should be (changed it manually, then clicking on it brought me to the page I want to reach):

      <a href="username/repository/src/c0mm1th4sH/File%20with%20%spaces.md">
      

      Unfortunately I couldn't accomplish that. Some of the things I have tried so far:

      [Link](File with spaces.md)
      [Link](File%20with%20spaces.md)
      [Link](File\ with\ spaces.md)
      [Link]("File with spaces.md")
      

      It results in the following HTML in Bitbucket:

      <a href="/username/repository/src/c0mm1th4sH/File%2520with%2520spaces.md">
      <a href="/username/repository/src/c0mm1th4sH/File%2520with%2520spaces.md">
      <a href="/username/repository/src/c0mm1th4sH/File%5C%2520with%5C%2520spaces.md">
      <a href="" title="File with spaces.md">
      

      You can play with the example repository I created.

      Stack Overflow

      See comment:

      Appears to be a tremendous amount of variation in how implementations render (updated Waylan's link) those. However, your second example seems to work most consistently. If that doesn't work, then I would report it as a bug. – Waylan

            [BCLOUD-12194] Link to filenames with spaces in Bitbucket Markdown (BB-15884)

            Abhin Chhabra (Inactive) made changes -
            Status Original: GATHERING IMPACT [ 12072 ] New: CLOSED [ 6 ]
            vargavince91 made changes -
            Status Original: CLOSED [ 6 ] New: GATHERING IMPACT [ 12072 ]
            Abhin Chhabra (Inactive) made changes -
            Status Original: GATHERING IMPACT [ 12072 ] New: CLOSED [ 6 ]
            Geoff created issue -

              achhabra@atlassian.com Abhin Chhabra (Inactive)
              93ee542e74c8 vargavince91
              Affected customers:
              1 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: