You need to sign in to do that
Don't have an account?
d3developer
Visualforce equivalent of Java StringEscapeUtils
I'm escaping Strings for Javascript and curious if there is anything in APEX that mirrors the org.apache.commons.lang Class StringEscapeUtils in Visualforce.
If not I suppose I will write it myself!
VisualForce has some function for encoding such as HTMLENCODE, JSENCODE, JSINHTMLENCODE, and URLENCODE. There is also the encodingUtil class in Apex.
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_restful_encodingUtil.htm
http://www.salesforce.com/us/developer/docs/pages/Content/pages_variables_functions.htm?SearchType=Stem&Highlight=URLFOR
Mike
All Answers
VisualForce has some function for encoding such as HTMLENCODE, JSENCODE, JSINHTMLENCODE, and URLENCODE. There is also the encodingUtil class in Apex.
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_restful_encodingUtil.htm
http://www.salesforce.com/us/developer/docs/pages/Content/pages_variables_functions.htm?SearchType=Stem&Highlight=URLFOR
Mike