I have a javascript function which accepts strings which include quotation marks and displays in a input field. But this function does not accept the string after the quotation mark
function searchFormatter(cellvalue, options, rowObject) {
return '<input id="txt' + cellvalue + '" type="text" disabled="disabled" value="' + cellvalue + '" />';
}
Eg. 21″ Inch ==> 21
Is there anyway I can pass quotation marks to the function and print them. I don’t want to replace them. I want to display them.
You must escape special HTML characters like
",<,>.Eg: