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

XMLWordPrintable

    • 4
    • Minor

      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.

            Assignee:
            Unassigned
            Reporter:
            Rodrigo Morette
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: