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

New Markdown editor replaces certain characters with HTML-safe entities

    XMLWordPrintable

Details

    Description

      The Markup/Markdown text of an issue-description placed in Bitbucket's built-in issue tracker (including this very one, that’s used for Bitbucket’s site itself) will load back for editing in a corrupted form if text contains characters such as greater-thans, less-thans, ampersands, single quotes, or double quotes. Submitting without making any changes in the text-box (for instance, just changing the issue-title) actually causes changes in the description because the reverse conversions do not occur, and the entity-codes are taken as literals. This causes further corruption on later edits because the new ‘&’s are then converted into &}}which is then (on next edit) converted to {{&, etc.

      Browsers used:

      • Firefox 60.6.1esr
      • Chrome 73.0.3683.103
      • Firefox 67.0 (Quantum)
      • Chrome 64.0.3282.167

      Operating systems used:

      • Windows 7 Enterprise
      • Windows 10 Enterprise

      To reproduce:

      1. Using one of the above browsers, create a new issue using Bitbucket’s internal issue-tracker.
      2. Into the description, paste the contents of the attached markdown file.
      3. Save the issue.
      4. Return to the issue you just created and select “Edit”.
      5. Note that occurrences of the above-listed characters will appear in the editor itself as their HTML-entity representations e.g. '.
      6. (optional) Saving the document will result in these entities being saved literally, even if the user took no actions to change the description, but instead changed the issue-status, title, or other.

      Attachments

        1. 1598400536-bb-original-json.png
          1598400536-bb-original-json.png
          11 kB
        2. 2627238224-bb-edit-json.png
          2627238224-bb-edit-json.png
          30 kB
        3. 89.markdown
          10 kB
        4. 89.png
          89.png
          303 kB

        Issue Links

          Activity

            People

              rstocker Robin Stocker (Inactive)
              5fc36fc9778b koyae
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: