Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-80194

Issue descriptions in the API are not including empty paragraph tags for empty lines

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • Issue - Backend
    • None

    Description

      When using the API to retrieve HTML descriptions, blank lines/paragraphs are not being returned, causing the description's HTML to be very different from what appears in the Jira application.

      In the API response,  <p> </p> empty paragraphs used for for blank lines have been removed. Instead, there are only additional newlines (\n\n), which are not significant in HTML formatting/rendering.

      Here's the HTML returned by the API when retrieving the issue:

      <p>Paragraph</p>\n\n\n\n<p>Testing blank lines</p>\n\n\n\n<p>Testing multiple blank lines</p>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<p>This is after many blank lines.</p>

      This was reported using the v2 API, e.g. GET /rest/api/2/issue/ISSUE-123?expand=renderedFields.

      This is causing inconsistent formatting when trying to render the descriptions as HTML.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              9e6ef5b5b664 Rodrigo Morette
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: