Skip to main content
Solved

Front is adding blank line before bullet list in draft posted via API

  • November 17, 2025
  • 1 reply
  • 32 views

make
Forum|alt.badge.img

I have a tool that POST a draft, with a body formatted in HTML like:

“<p>Based on the information provided, we are pleased to offer you a quote of:</p>
<ul>
<li>Transport: EUR <strong>200</strong> (Excl. VAT)</li>
<li>Insurance (optional, on declared value) : EUR <strong>20</strong> (Excl. VAT)</li>
</ul>”

When I visualize the draft created in Front (app or web browser), I see a blank line before the list:

When I inspect the object, I see a <br></br> balise, which was not in the original HTML.

This disappears when I’m viewing the draft as another person (viewer mode).

And so when I send it, the blank line remains.. This is quite problematic as it gives something weird visually.

Best answer by evano

Hi there,

Front will convert the newline between the </p> and the <ul> tags into <br>.

I recommend stripping newlines from your HTML right before POSTing it; you can retain readability elsewhere, just some extra sanitizing for Front’s API.

However, this approach might cause problems if you’re using newlines for formatting, like in a <pre> block.

I hope this helps!

1 reply

Forum|alt.badge.img+5
  • Fronteer
  • Answer
  • November 18, 2025

Hi there,

Front will convert the newline between the </p> and the <ul> tags into <br>.

I recommend stripping newlines from your HTML right before POSTing it; you can retain readability elsewhere, just some extra sanitizing for Front’s API.

However, this approach might cause problems if you’re using newlines for formatting, like in a <pre> block.

I hope this helps!