I'm looking to display a Custom Label on a Visualforce page, however when the Custom Label has line breaks in it, they're not coming through to the Visualforce page.
If I inspect the html, the line breaks aren't there either, so using a <pre>
as suggested in How to show the multi-line string in wrapper class in a VF page won't work.
From what I can see, this behaviour is different to a standard Object's text field that contains line breaks.
The only way I can think of it is to add a method in the controller that updates the string with <br />
elements, and it's the output of that method that's displayed rather than the Custom Label itself.
Has anyone come across this or have any other suggestions for a more straight forward solution?
The purpose of this is to display an address on multiple different visualforce pages that is likely to change, hence using a Custom Label rather than embedding it directly in the page.