New line in <ri:attachment>....</ri:attachment> throws StorageUnmarshalXhtmlException

Hi all,

I am trying to update a page content using - PUT: /rest/api/content/:id. I faced an issue while updating the content containing <ri:attachment>....</ri:attachment> in the storage format.

I observed that if the opening and closing tag of <ri:attachment>....</ri:attachment> does not remain in the same line, then it throws StorageUnmarshalXhtmlException

There are two scenarios

  1. below snippet is saved properly.
    1. <ri:attachment ri:filename="ADD icon.png" ri:version-at-save="1"><ri:page ri:content-title="Linux Unix Task" /></ri:attachment>

  2. Introduction of a new line i.e. if </ri:attachment> is placed in the next line, it start throwing the exception. below given snippet throws StorageUnmarshalXhtmlException. This exception is thrown by Atlassian while processing the content and trying to save it.

1. <ri:attachment ri:filename="ADD icon.png" ri:version-at-save="1"><ri:page ri:content-title="Linux Unix Task"/> 2. </ri:attachment>

I would like to get a clarification on below items -

  • what is special with <ri:attachment>....</ri:attachment> ? why it is treated differently from other tags like p, div, table e.t.c ?
  • should the opening and closing tag of it be always in the same line? why?
  • Is there any alternative to fix this issue?

Thanks & Regards,
Deepak

Hi @DeepakSharma ,
Indeed this is the issue, and we created a public ticket to track it.
https://jira.atlassian.com/browse/CONFCLOUD-75927
Feel free to add comments there if you have any additional thoughts.

Best regards,
Damian