Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Why Don't <br> Tags Work in Confluence with Rovo? [Champions Slack Insider]

This one from @Yong Yang  starts simple…

“My agent returns <br> for line breaks, but when I push it to Confluence, they disappear.”

…and quickly turns into:

  • formatting issues
  • REST API errors
  • giant payload headaches

Let’s break it down.

The root issue: Confluence ≠ HTML renderer

Even if your agent returns:

 

Line 1<br>
Line 2<br>
Line 3

Confluence will strip the <br> tags when content is inserted via:

  • Rovo
  • Automation
  • REST API

Why? Because Confluence converts everything into:

  • ADF (Atlas Doc Format) or
  • Storage format

Inline HTML like <br> doesn’t survive that conversion.

What actually works for line breaks

Instead of <br>, use:

✔ Double line breaks (recommended)

 

Line 1

Line 2

Line 3

 

✔ Structured formatting

  • Paragraphs
  • Lists
  • Tables

These map cleanly into Confluence’s internal format

Rovo Chat vs Automation behavior

Rovo Chat:

  • Double line breaks → render correctly

Automation → Confluence page:

  • Usually works
  • But Confluence may normalize spacing

Most reliable approach: Structure content intentionally (not visually)

Now the real problem: that 400 error 

 

INVALID_MESSAGE
Illegal unquoted character ((CTRL-CHAR, code 10))
This looks like a size issue… but it’s not.

It’s invalid JSON

Specifically:

  • A raw line break made it into a JSON string
  • JSON requires \n (escaped), not actual newlines

How to fix it

Option 1: Proper JSON encoding

  • Escape line breaks → \\n
  • Escape quotes
  • Or use a client that handles JSON automatically

Option 2: Send structured payloads

  • Don’t embed content as raw strings
  • Pass objects (especially for ADF)

Markdown → Confluence = not direct

Another key point: Confluence does NOT accept Markdown directly

You must convert to:

  • ADF (atlas_doc_format) → structured JSON
  • Storage format (HTML) → string-based

Why ADF breaks with large outputs

ADF is powerful… but fragile at scale.

Issues you’ll hit:

  • Deeply nested JSON
  • Large tables
  • Long cell content
  • Payload size limits

Result: errors, truncation, or failed API calls

Why HTML (storage) can be easier

Switching to storage (HTML) helps because:

  • Simpler structure
  • Less nesting
  • More forgiving

But: It’s not unlimited

You still need to:

  • Trim long content
  • Split large tables
  • Avoid massive single payloads

Best practice (this saves headaches)

If you’re pushing Rovo output into Confluence:

1. Avoid <br> completely
2. Use structured formatting (paragraphs, lists, tables)
3. Batch large outputs

  • 25–50 rows per table
  • Multiple sections/pages

4. Keep cells short

  • Link out instead of embedding everything

5. Prefer HTML for large tables

  • Use ADF for smaller, structured content

Champion takeaway

Most issues here aren’t “AI problems”

They’re:

  • Format mismatches
  • Payload limits
  • Encoding errors

Rovo gives you content. Confluence decides how it survives.

0 comments

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events