Line breaks when displaying information in an external integration

Hello,

When developing an integration, I had difficulties with line breaks

It should be possible to make line breaks when displaying information in an external integration

Here is claude’s feedback on the vigieau integration for example:

Why one line per location is impossible

The line break is sent — a real \n — and we can see it in the container logs. It’s the Gladys configuration screen that eats it, for three cumulative reasons:

  1. ActionsCard.jsx renders the response as <div class="alert alert-success">{getLocalizedText(...)}</div>: a React text child. All markup is escaped, so neither <br> nor <pre> are possible.
  2. In HTML, a \n in text is a space, unless the CSS says white-space: pre-wrap. Neither Gladys’ CSS nor Tabler’s .alert set it (the only pre-wrap in the entire external integrations front end is on the LOGS page).
  3. The Unicode separators U+2028 / U+2029, which the CSS spec presents as forced line breaks, have been measured in Chromium: they are also collapsed.

Checked at tag v4.84.4 and on master. There is therefore nothing else to send: the fix is a one-line CSS rule in the heart of Gladys, not something that this integration can deliver. Hence the « • » that opens each entry: it is what keeps the list readable once everything is crushed on one line — a bare number gets lost between a postal code and two coordinates, a « • » cannot appear in an address.