Skip to content
This repository
Browse code

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)
  • Loading branch information...
commit 6c91aa0ec5a215343934c5b059c1e6174aa388e0 1 parent 1091c7b
Ingo Schommer authored March 30, 2012

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. 5  admin/javascript/LeftAndMain.Content.js
5  admin/javascript/LeftAndMain.Content.js
@@ -142,6 +142,11 @@
142 142
 				var formData = form.serializeArray();
143 143
 				// add button action
144 144
 				formData.push({name: $(button).attr('name'), value:'1'});
  145
+				// Artificial HTTP referer, IE doesn't submit them via ajax. 
  146
+				// Also rewrites anchors to their page counterparts, which is important
  147
+				// as automatic browser ajax response redirects seem to discard the hash/fragment.
  148
+				formData.push({name: 'BackURL', value:History.getPageUrl()});
  149
+
145 150
 				jQuery.ajax(jQuery.extend({
146 151
 					url: form.attr('action'), 
147 152
 					data: formData,

0 notes on commit 6c91aa0

Please sign in to comment.
Something went wrong with that request. Please try again.