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

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Low
    • None
    • Affects Version/s: 5.10.1, 5.16.0
    • Component/s: None
    • None
    • Severity 3 - Minor

      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.

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

              Created:
              Updated:
              Resolved: