I seem to be having issues. I have a query string that has values that can contain single quotes. This will break the query string. So I was trying to do a replace to change
I have used
str.replace("'", "");
to replace the single quote in my string. Its working fine for me.