Hi,
We receive an HTML‑formatted string from a downstream system, for example:
"text": "<fieldset style=\"border:0px;\"><h2 style=\"margin-top:16px;\">Bhargav</h2><ul><li>Date: 17-Mar-2026</li><li>Interaction is an initial assessment</li><li>Therapy session number: 0</li><li>Patient is suitable to start therapy</li></ul><h2 style=\"margin-top:16px;\">Assessment Screener</h2><ul><li>Further information from Assessment Screener: Sir David Attenborough's 100th birthday will be celebrated with three special programmes, the BBC has announced.\n\nThe corporation will mark Sir David's \"extraordinary milestone\" on 8 May with a week of special programming featuring new and old shows by the beloved presenter.\n\n</ul></li>"
We display this in a Rich Text Editor, which correctly renders the HTML, but the \n line breaks are not shown in the UI.
My requirement is to ensure that every \n starts a new line.
However, the clipboard does not show any \n characters, and using a replaceAll function does not work because the property value no longer contains \n.
Example attempted:
@String.replaceAll(.Property, "\\n", "<br>")
Do you have any suggestions on how to handle this in Pega itself, without requiring changes from the downstream system?