var accordion = document.createTextNode(tp.getAccordionContent());
var el = document.createElement("div");
el.appendChild(accordion);
document.getElementById("gp").appendChild(el);
tp.getAccordion() function returns me a string like < div .... and it is being decoded. All I want is to get it encoded and implement the div which has an id = gp with that data.
any help and advises would be greatly appreciated.