I have found a bunch of solutions to other characters, such as > and & but accented characters such as ñ don’t work with those solutions. For example, this function:
function encodeHTMLEntities(text) {
return $("<textarea/>").text(text).html();
}
works great with > and & but not ñ (which i want to be converted to ñ
Thanks for any help,
kevin