I have double quotes as well as single quotes in a TD element. On click of that TD I'm passing value inside that TD to the function and create input element.
For the single quotes it's working fine, but in case of double quotes it's removing string after the double quotes.
Have a look at this fiddle, I tried escape and unescape but that also not working, I also tried replace function.
$(".table td").click(function(){
var input = createInput($(this).html());
$(this).html(input);
});
createInput = function(str){
str = typeof str !== 'undefined' ? str : "";
input = '<input value="'+str+'">';
return input;
}