//After every call to div.innerhtml(xxx) or div.html(xxx) do the following:
if (CKEDITOR.env.ie) {
//If IE then fix IE convertion of links...
fixIELinks(div);
}
function fixIELinks(html) {
$(html).find("a:not([target='_blank'])").each(function() {
var href = $(this).attr("href");
href = href.substring(href.indexOf('#'));
$(this).attr("href", href);
});
}
Re: IE changes relative links to absolute links
//After every call to div.innerhtml(xxx) or div.html(xxx) do the following: if (CKEDITOR.env.ie) { //If IE then fix IE convertion of links... fixIELinks(div); } function fixIELinks(html) { $(html).find("a:not([target='_blank'])").each(function() { var href = $(this).attr("href"); href = href.substring(href.indexOf('#')); $(this).attr("href", href); }); }href="http://localhost/...#TEST"
href="#TEST"