+ Start a Discussion

Escape & Unescape functions in Site.com

I need to display some content with different fonts,styles and hyperlinks. So i choose richtext field in the custom object. That content has to display in the Data Repeater.

I am using escape function in custom code of Data Repeater.

      var news = Content_Syndicated__c:escape('{!Content_Syndicated__c}')

and i am using unescape function in the head markup section of a site page.

 Var content =  unescape(news.Content_Syndicated__c) ;

I need to display entire content with the fonts,styles,hyperlinks.  What is the best function to encode and decode and to display the content as in the rich text?
NehalNehal (Salesforce Developers) 

There seems to be a limitation with the Editor for special characters. Please go through the below link for more details on displaying the content from Rich Text Area.
You can’t paste special characters, such as bullets or curly quotes, into a rich text field from another application. It’s best to type or paste in plain text and use the rich text editor to format it.


I hope this helps. Please mark this as a "Best Answer" if this has resolved your issue.