- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi @ujjyals87155580,
take care of escaping special characters.
You may call a following function to escape text before putting it in JSON:
String.prototype.escapeSpecialCharacters = function() {
return this.replace(/\\n/g, "\\n")
.replace(/\\'/g, "\\'")
.replace(/\\"/g, '\\"')
.replace(/\\&/g, "\\&")
.replace(/\\r/g, "\\r")
.replace(/\\t/g, "\\t")
.replace(/\\b/g, "\\b")
.replace(/\\f/g, "\\f");
};
Regards,
Milan
Views
Replies
0 Likes
Total Likes