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

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

XMLWordPrintable

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

      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.

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

                Created:
                Updated: