Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-11479

"@" character followed by double quote containing string escapes content within the string in Markdown

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Low
    • None
    • 5.10.1, 5.16.0
    • None
    • None

    Description

      Summary

      The quoted user mention syntax causes incorrect escaping in code blocks that occur in:

      • pull request comments
      • pull request description
      • Markdown (md) files

      Steps to Reproduce

      1. Add the following text to one of the following:
      • pull request comments
      • pull request description
      • Markdown (md) files
      ```cs
      var s1 = "c:\test\\zoo\\";
      var s2 = @"c:\test\bar\\baz";
      ```
      

      The specific sequence of characters required to experience this behaviour is the 'at' symbol followed by a double quote and some content that contains backslashes e.g. @"hello\world"

      Expected Results

      The text is displayed in the following way:

      var s1 = "c:\test\\zoo\\";
      var s2 = @"c:\test\bar\\baz";
      

      Actual Results

      The text is displayed like this:

      Pull request comment

      Pull request details

      Markdown file

      Workaround

      If it is acceptable to use single quotes, surrounding the string following the @ with single quotes will prevent this from occurring. 

      It is also possible to double-escape the backslashes, however note that once this bug is fixed, that double escape will likely no longer apply.

      Attachments

        1. markdown_FileContent.png
          21 kB
          Caterina Curti
        2. markdown_pullRequestComment.png
          15 kB
          Caterina Curti
        3. markdown_pullRequestDetails.png
          15 kB
          Caterina Curti

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ccurti Caterina Curti
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: