From 6c91aa0ec5a215343934c5b059c1e6174aa388e0 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 30 Mar 2012 15:58:54 +0200 Subject: [PATCH] BUGFIX Force referer via "BackURL" POST data in CMS to work around IE problems with sending the base URL as the referer instead of the actual one (#7002) --- admin/javascript/LeftAndMain.Content.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/admin/javascript/LeftAndMain.Content.js b/admin/javascript/LeftAndMain.Content.js index a0e514c31..d1cf3d221 100644 --- a/admin/javascript/LeftAndMain.Content.js +++ b/admin/javascript/LeftAndMain.Content.js @@ -142,6 +142,11 @@ var formData = form.serializeArray(); // add button action formData.push({name: $(button).attr('name'), value:'1'}); + // Artificial HTTP referer, IE doesn't submit them via ajax. + // Also rewrites anchors to their page counterparts, which is important + // as automatic browser ajax response redirects seem to discard the hash/fragment. + formData.push({name: 'BackURL', value:History.getPageUrl()}); + jQuery.ajax(jQuery.extend({ url: form.attr('action'), data: formData,