function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dkorba2k5dkorba2k5 

Problem with Text Formula field with BR()

With VF whenever a text formula field has a <br> in it, it's being rendered as &lt;br&gt;.  How can we support this?  These are long text fields and need to have line breaks in it.
Sam.arjSam.arj
You should use the  BR()  function and not directly insert <br> tag into text.


dkorba2k5dkorba2k5
The formula field is using the BR() function.  That's the problem here.  Then when it displays in the UI it has <br> tags in it.  But when we try to render it with VisualForce we get the &lt;br;&gt; conversion and get no line breaks and end up with junk in the text field.
dkorba2k5dkorba2k5
Interesting ... ok .. got it to work.  What I had to do was in my controller replace any <br>'s in the string with <BR> and then use the outputText tag with escape="false" in order to get it to work right.