Unable to replace special character in Script include and Business Rules
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2010 08:54 AM
Hello All,
I am facing a problem in xml creation due to special characters. I am creating xml in script include by using parameters from business rule. There are some string which contains special symbol like (&,') .
To replace them with corresponding html name or html code I am using following code :
mystring.replace("&", "&") or mystring.replace("&", "&")
but , When I save this business rule, it changes the above line to
mystring.replace("&", "&");
Please suggest a way or approach to prevent this .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2014 08:37 PM
Thanks.. But the problem here is the response from external source is escaped (special characters) are handled. But when the same is retrieved in service now using
var response = sm.getResponse();
The response xml still has unescaped special characters say like & , > which when being parsed without escaping (converting & as &) is causing issue.
we can script in during processing to replace the special characters but is there way this can be handled without much processing at receiver's end..? kindly advise..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2017 11:34 AM
I'm not sure I follow.