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
soni rajputsoni rajput 

Problem Related to XSS attack

Hi,

 

I am using the follwing code in my visual force page

<script type="text/javascript">
              document.writeln("{!JSENCODE(ServerRecord.Description__c)}");
  </script>

Here ServerRecord.Description__c is a value which is coming from salesforce database.

So my problem is that the code given above is safe from XSS attack or not?

 

Thanks,

Soni