Pages created via API are changed ("p" tags added)

Hleb Valoshka
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 6, 2024

Good day.

We're migrating on-premise Confluence to cloud. Some of our pages are created via REST API during application rollouts. With on-premise instance we were using v1 API, with cloud one we use v2.

Pages pushed to cloud are broken, they have additional "p" tags inserted. For example, the old page:

<ul>
          <li>Redacted<ul>
            <li>
             <a class="external-link" href="redacted" rel="nofollow">redacted</a><i> (redacted)</i>
            </li><li>
             <a class="external-link" href="redacted" rel="nofollow">redacted</a><i> (redacted)</i>
             
            </li>
           </ul>
 ...

While the new one is:

<ul class="ak-ul" data-indent-level="1"><li><p data-renderer-start-pos="720">Redacted</p><ul class="ak-ul" data-indent-level="2"><li><p data-renderer-start-pos="752"><a data-testid="link-with-safety" href="redacted" title="redacted" data-renderer-mark="true" class="cc-1rn59kg">redacted</a><em data-renderer-mark="true"> (redacted)</em>
            </p></li><li><p data-renderer-start-pos="799"><a data-testid="link-with-safety" href="redacted" title="redacted" data-renderer-mark="true" class="cc-1rn59kg">redacted</a><em data-renderer-mark="true"> (redacted)</em>
             
            </p></li></ul>

 

How to make Confluence not to insert any unrequested content?

1 answer

0 votes
marc -Collabello--Phase Locked-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 9, 2024

Not sure, but it looks like you are not looking at the Confluence storage format, but at the rendered html format.

Hleb Valoshka
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 10, 2024

Yes, in on-premise Confluence we use rendered xml because we use macro. I don't think that undocumented json storage format is a proper replacement for that.

 

I also don't understand why Confluence can't simply show what it has but instead it transforms xml into json and then into html again.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events