Pasting into body of plain text macro removes whitespace/indentation

We have noticed an issue that we believe only started occurring recently (anecdotally, I started noticing it sometime around Confluence Server 7.7.x).

One of our apps is a dynamic content macro that accepts plain text (either JSON or YAML) in the body.

As part of our standard QA procedure when releasing a new version, we manually test by inserting a new macro onto a page, pasting a known good JSON or YAML sample into the body of the macro, saving the page, and confirming the macro renders as expected.

This has been our pre-release verification process for a number of years (since Confluence v5.x).

Recently, we have noticed that pasting JSON or YAML into the body of a macro loses any whitespace or indentation of the original copied text.

For JSON this isn’t a huge concern; but for a format such as YAML that relies on significant whitespace as part of the structure, losing the indentation on paste results in invalid YAML.

Our current workaround for this is to manually correct the indentation after pasting; but as you can imagine this is less than ideal for a process that was previously a simple copy -> paste -> save -> test.

I’ve searched both here and on JAC for any existing reports of this issue; but so far have found nothing.

Thought I’d just ask here before blindly raising a new bug report on JAC.

1 Like

We’ve done some further testing and can confirm that the problem started between 7.6.2 and 7.7.2.

Pasting YAML into the body of a macro in 7.6.2 preserves the indentation.
Pasting YAML into the body of the same macro in 7.7.2 loses the indentation.

So it eems like a genuine regression introduced in 7.7.x.

The release notes for 7.7 includes:

Enjoy smoother editing with our upgraded editor. We solved several long-standing frustrations related to:

  • copying and pasting lists

…and its possible that the new upgraded editor is the cause.

Will proceed with filing a bug report in JAC.

1 Like

This is affecting us too. I thought I was losing my mind but this confirms what I’m seeing.

For any Atlassian staff following along, I created a DEVHELP request on 8 September (1 month ago) in relation to this issue, and the request has been sitting at “Waiting for support” status ever since:

Is DEVHELP the right place for this?

1 Like