html() doesn't escape special characters
Hi all
I am using this code:
$("#PrintAspirantsButton").click(function () {
$("#innerHtml").val(base64_encode($(".OIMAppPrimaryAction").html()));
});
because basically I need to get the html of a certain node into a forms variable. I base64-encode it first, though, but that is besides the point :-)
My issue is that the html() function seems to be outputting strings like "jæger" instead of "jæger" which is actually in the HTML. So the html() function appears to disregard the encoding of special characters that has been used in the HTML. If I view source on the HTML in the browser, I see the "jæger" just fine.
This is giving me a headache later on, so I was hoping that someone can tell me how to avoid/fix this?
Thanks!
--
eliasen