+ Start a Discussion

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.
You should use the  BR()  function and not directly insert <br> tag into text.

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.
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.