• horacio
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Hello, I am trying to escape a rich textArea field to be shown in a visualforce page.

Right now, it's escaped using {!HTMLENCODE()}.

What I am trying to do is to allow a set of HTML tags, but only in some cases.

 

What I am looking for, ideally, is a way to call the HTMLENCODE function from apex code most of the time, and then implement my own escaping method for the cases that allow some HTML tags. What I am trying to avoid is re-implementing HtmlEncode in my classes.

 

So, the question is : is there a way to access the HTMLENCODE visualforce function from Apex code? If not, is there a functionally equivalent alternative I can reuse?

 

Any help will be appreciated, thanks!

 

Horacio

Hello, I am trying to escape a rich textArea field to be shown in a visualforce page.

Right now, it's escaped using {!HTMLENCODE()}.

What I am trying to do is to allow a set of HTML tags, but only in some cases.

 

What I am looking for, ideally, is a way to call the HTMLENCODE function from apex code most of the time, and then implement my own escaping method for the cases that allow some HTML tags. What I am trying to avoid is re-implementing HtmlEncode in my classes.

 

So, the question is : is there a way to access the HTMLENCODE visualforce function from Apex code? If not, is there a functionally equivalent alternative I can reuse?

 

Any help will be appreciated, thanks!

 

Horacio