Merge pull request #3391 from tractorcow/pulls/3.1/fix-history-js

BUG Reapply fix for cms crashing due to History.js blindly appending slashes to end of url
This commit is contained in:
Sean Harvey 2014-08-15 15:24:46 +12:00
commit 199d7a8ba7

View File

@ -374,7 +374,8 @@ jQuery.noConflict();
// 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()});
// TODO Replaces trailing slashes added by History after locale (e.g. admin/?locale=en/)
formData.push({name: 'BackURL', value:History.getPageUrl().replace(/\/$/, '')});
// Save tab selections so we can restore them later
this.saveTabState();