Index: branches/5.2.x/core/kernel/utility/opener_stack.php =================================================================== diff -u -N -r14795 -r14895 --- branches/5.2.x/core/kernel/utility/opener_stack.php (.../opener_stack.php) (revision 14795) +++ branches/5.2.x/core/kernel/utility/opener_stack.php (.../opener_stack.php) (revision 14895) @@ -1,6 +1,6 @@ data[$index]; } - list ($index_file, $env) = explode('|', $this->data[$index], 2); - $params = $this->Application->processQueryString($env, 'pass'); + list ($index_file, $original_env) = explode('|', $this->data[$index], 2); + $fixed_env = str_replace(Array ('&', '%5C'), Array ('&', '\\'), $original_env); + $params = $this->Application->processQueryString($fixed_env, 'pass'); + // detect "__URLENCODE__" parameter value, used when opener stack element was built // without it rebuilding opener stack element will convert all "&" to "&" elements - $params['__URLENCODE__'] = (strpos($env, '&') !== false && strpos($env, '&') === false) || (strpos($env, '\\') !== false && strpos($env, '%5C') === false) ? 1 : 0; + $params['__URLENCODE__'] = $original_env != $fixed_env ? 1 : 0; $template = kUtil::popParam('t', $params, ''); Index: branches/5.2.x/core/admin_templates/incs/close_popup.tpl =================================================================== diff -u -N -r14572 -r14895 --- branches/5.2.x/core/admin_templates/incs/close_popup.tpl (.../close_popup.tpl) (revision 14572) +++ branches/5.2.x/core/admin_templates/incs/close_popup.tpl (.../close_popup.tpl) (revision 14895) @@ -12,7 +12,7 @@ var $modal_windows = truefalse; if ($is_debug) { - document.write('' + $redirect_url.replace('%5C', '\\') + ''); + document.write('' + $redirect_url.replace(/%5C/g, '\\') + ''); } else { proceed_redirect(); @@ -43,7 +43,7 @@ } else if (!$use_popups) { // not using popups (for editing), but close_popup called (e.g. from selector) - window.location.href = $redirect_url.replace('%5C', '\\'); + window.location.href = $redirect_url.replace(/%5C/g, '\\'); } } Index: branches/5.2.x/core/admin_templates/js/script.js =================================================================== diff -u -N -r14856 -r14895 --- branches/5.2.x/core/admin_templates/js/script.js (.../script.js) (revision 14856) +++ branches/5.2.x/core/admin_templates/js/script.js (.../script.js) (revision 14895) @@ -1817,7 +1817,7 @@ // setTimeout allows to call method indirectly. Without it whole idea won't work 2nd time (try adding 2 relations one after another) setTimeout( function() { - openSelector('adm', $ru.replace('%5C', '\\') + '&merge_opener_stack=1'); + openSelector('adm', $ru.replace(/%5C/g, '\\') + '&merge_opener_stack=1'); }, 200 ); @@ -1828,7 +1828,7 @@ window.focus(); if ( !(($force_skip_refresh === true) || (typeof $skip_refresh != 'undefined' && $skip_refresh)) ) { - window.location.href = $redirect_url.replace('%5C', '\\'); + window.location.href = $redirect_url.replace(/%5C/g, '\\'); } }