You need to sign in to do that
Don't have an account?
How to overcome the SFDC Known Issue on Case Descriptions with <script> tags
The Known Issue:
If the Case description field contains <script> and </script> all special characters are escaped (even the characters outside the tags).
For example:
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
google.load("earth", "1", {"other_params":"client=gme-noaa&sensor=false&channel=NMFS.SWFSC.PRD.ShipResearchSurveys"});
changes to:
<script type="text/javascript" src="http://www.google.com/jsapi"></script>;
google.load("earth", "1", {"other_params":"client=gme-noaa&sensor=false&channel=NMFS.SWFSC.PRD.ShipResearchSurveys"});
The same behaviour is not observed when entering the same text into a Case Comment.
The Workaround:
Create a workflow rule on Cases which triggers every time the case is created or edited. Add a Field Update to this rule to update the Description field with syntax like:
SUBSTITUTE (
SUBSTITUTE (
SUBSTITUTE (
SUBSTITUTE(Description , '&' , '&') ,
'<', '<' ),
'>','>' ),
'"','"' )
If the data type of field is "Text Area" then it will show any tag (HTML or Script) as it is but if the data type of field is "Text" or "Long Text Area" then it will take any tag except “script” tag. I think salesforce does not save script tag as it is in "Text" or "Long Text Area" due to the security reasons.
Hope this helps.