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

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

    XMLWordPrintable

    Details

      Description

      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

        Attachments

          Activity

            People

            Assignee:
            achhabra@atlassian.com Abhin Chhabra (Inactive)
            Reporter:
            93ee542e74c8 vargavince91
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: