function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
KamulsKamuls 

What JSENCODE function will do?

What JSENCODE function will do?

 

How it will protect from attacker?

Jia HuJia Hu
The JSENCODE function encodes text strings and merge field values for use in JavaScript by inserting escape characters, such as a backslash (\), before unsafe JavaScript characters, such as the apostrophe (').

{!JSENCODE(text)} and replace text with the merge field or text string that contains the unsafe JavaScript characters.

doc:
http://www.salesforce.com/us/developer/docs/apexcode/Content/pages_security_tips_scontrols.htm