I'm working on an application that requires a text field to fade in with the value being loaded by AJAX. (I'm doing this all with jQuery), here's the code:
$("div#p"+eId+"_content").html("<input class='editPost' type='text' value='"
+ oldCont
+ "' id='p"
+ eId
+ "_editBox' />");
Unfortunatly, oldCont
can contain single quotes, which means the textbox will only contain oldPost
up until that single quote. How could I display oldCont
without having that problem, but still retaining that single quote (without the \ from escaping it)?