1

I have recently added a Rich Text Field to an object, the field is not mandatory when creating a new object. It has a minimum character limit of 10 (I'm not really sure what the character limit is for as I can save it when it's empty)

The problem I'm having is if I create an object and leave the Rich Text Field empty, it's returning

<br>

in the UI.

enter image description here

It's being used as a tooltip.

I had a look around online but couldn't find any similar issues to this.

Has anyone encountered something like this before?

2
  • Is the field being set to a default value?
    – Jagular
    Sep 29, 2014 at 15:45
  • @Jagular nope, no default value.
    – Daft
    Sep 29, 2014 at 15:48

2 Answers 2

0

I'm not sure why the <br/> is appearing, but one approach might be a trigger/workflow that sets the field to null if the length is less than 10 characters.

It sounds like you want 10 characters as an enforced minimum, so you probably want to add a validation rule anyway which would stop the invalid entries from being allowed.

-1

I was able to reproduce this on my developer org. Using escape attribute on outputtext tag can solve your problem.

eg. <apex:outputText escape="false" value="{!lead.test__c}"/>

2
  • This does work but is never a recommended solution. Using escape="false" opens you up to a whole range of security concerns, and if this is for a product it would not pass the AppExchange security review.
    – Matt Lacey
    Sep 30, 2014 at 4:06
  • Thanks sperikal, but like @LaceySnr says, this isn't best practice.
    – Daft
    Sep 30, 2014 at 8:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .