Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to render some HTML stored within a custom sObject's a richText field.

I am using an outputText field as follows:

<apex:outputText value="{!Information.Content__c}" escape="false"/>

The field contains the following:

<code> CoolCodeExample codeExample = new CoolCodeExample(); </code>

However, it is not being rendered as HTML.

When I inspected it in the browser, the <code> tag is being wrapped with double quotes.

Anyway I can have this properly rendered in HTML? I imagine it is something mundane I've overlooked. Any help is most appreciated.

share|improve this question
Any reason why you go with output text .Go with outputfield instead – Mohith Shrivastava Aug 6 '14 at 18:21
up vote 5 down vote accepted

Per doc:

HTML code is not supported in the Salesforce HTML editor. HTML code is treated as text.

Using a Long Text Area field with

<apex:outputText value="{!Information.LongTextField__c}" escape="false"/> works.

share|improve this answer
Like I thought, some mundane detail I missed. Thank you very much. – Programmable Medley Aug 6 '14 at 18:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.