In a variable, string data is coming from text input like following.
var noteStr="<?php echo $_REQUEST["noteStr"];?>";
If user given any double quotes in text input then javascript give an error as expected. I am not finding a way to use javascript str.replace() in this scenario because before using that on string variable javascript engine generate errors.
How can i solve this problem using javascript? Advance thanks for help.