Given are those steps to reproduce:
* select a sub page in page tree
* open workspace module
* edit one of the workspace elements there
* save or close the editing process
* view is redirected to page id "0"
Encoding in the Javascript part to forward a correct returnUrl
is wrong. Instead of manually escaping sequences,
encodeURIComponent can be used.
Change-Id: Idda427015deb4595cc4e2c32542ba2d7a644e2b3
Fixes: #43049
Releases: 4.5, 4.6, 4.7, 6.0
Reviewed-on: http://review.typo3.org/16550
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
tooltip: TYPO3.l10n.localize('tooltip.editElementAction'),
handler: function(grid, rowIndex, colIndex) {
var record = TYPO3.Workspaces.MainStore.getAt(rowIndex);
tooltip: TYPO3.l10n.localize('tooltip.editElementAction'),
handler: function(grid, rowIndex, colIndex) {
var record = TYPO3.Workspaces.MainStore.getAt(rowIndex);
- var newUrl = 'alt_doc.php?returnUrl=' + Ext.urlEncode({}, document.location.href).replace("?","%3F").replace("=", "%3D").replace(":","%3A").replace("/", "%2f") + '&id=' + TYPO3.settings.Workspaces.id + '&edit[' + record.json.table + '][' + record.json.uid + ']=edit';
+ var newUrl = 'alt_doc.php?returnUrl=' + encodeURIComponent(document.location.href) + '&id=' + TYPO3.settings.Workspaces.id + '&edit[' + record.json.table + '][' + record.json.uid + ']=edit';
window.location.href = newUrl;
},
getClass: function(v, meta, rec) {
window.location.href = newUrl;
},
getClass: function(v, meta, rec) {