Index: core/admin_templates/tools/backup3.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/admin_templates/tools/backup3.tpl (revision 15908)
+++ core/admin_templates/tools/backup3.tpl (revision )
@@ -9,7 +9,7 @@
Index: core/admin_templates/catalog/item_selector/item_selector_advanced_view.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/admin_templates/catalog/item_selector/item_selector_advanced_view.tpl (revision 15908)
+++ core/admin_templates/catalog/item_selector/item_selector_advanced_view.tpl (revision )
@@ -21,7 +21,7 @@
this.switchTab();
}
- var $Catalog = new Catalog('', 'is_advanced_view_', 'ItemSelectorAdvancedView');
+ var $Catalog = new Catalog('', 'is_advanced_view_', 'ItemSelectorAdvancedView');
\ No newline at end of file
Index: core/admin_templates/export/export_complete.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/admin_templates/export/export_complete.tpl (revision 15908)
+++ core/admin_templates/export/export_complete.tpl (revision )
@@ -24,7 +24,7 @@
\ No newline at end of file
Index: core/admin_templates/incs/close_popup.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/admin_templates/incs/close_popup.tpl (revision 15908)
+++ core/admin_templates/incs/close_popup.tpl (revision )
@@ -6,11 +6,11 @@
\ No newline at end of file
Index: core/admin_templates/export/export_progress.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/admin_templates/export/export_progress.tpl (revision 15908)
+++ core/admin_templates/export/export_progress.tpl (revision )
@@ -8,7 +8,7 @@
\ No newline at end of file
Index: core/admin_templates/categories/categories_edit_relations.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/admin_templates/categories/categories_edit_relations.tpl (revision 15908)
+++ core/admin_templates/categories/categories_edit_relations.tpl (revision )
@@ -37,7 +37,7 @@
//Relations related:
a_toolbar.AddButton( new ToolBarButton('new_item', '::',
function() {
- openSelector('c-rel', '', 'TargetId', '950x600');
+ openSelector('c-rel', '', 'TargetId', '950x600');
} ) );
function edit()
\ No newline at end of file
Index: core/kernel/utility/http_query.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/kernel/utility/http_query.php (revision 15962)
+++ core/kernel/utility/http_query.php (revision )
@@ -669,8 +669,7 @@
$vars = $this->_removePassThroughVariables($vars);
}
- // transform arrays
- return $this->_transformArrays($vars);
+ return $vars;
}
/**
@@ -694,23 +693,6 @@
$url_params['no_pass_through'] = 1; // this way kApplication::HREF won't add them again
return $url_params;
- }
-
- function _transformArrays($array, $level_prefix = '')
- {
- $ret = Array ();
- foreach ($array as $var_name => $var_value) {
- $new_var_name = $level_prefix ? $level_prefix . '[' . $var_name . ']' : $var_name;
-
- if (is_array($var_value)) {
- $ret = array_merge($ret, $this->_transformArrays($var_value, $new_var_name));
- }
- else {
- $ret[$new_var_name] = $var_value;
- }
- }
-
- return $ret;
}
/**
Index: core/admin_templates/tools/restore3.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/admin_templates/tools/restore3.tpl (revision 15908)
+++ core/admin_templates/tools/restore3.tpl (revision )
@@ -14,7 +14,7 @@
}
);
- $Restore = new AjaxProgressBar('');
+ $Restore = new AjaxProgressBar('');
\ No newline at end of file
Index: core/admin_templates/catalog/catalog.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/admin_templates/catalog/catalog.tpl (revision 15908)
+++ core/admin_templates/catalog/catalog.tpl (revision )
@@ -24,7 +24,7 @@
$(document).ready(
function() {
Application.SetVar('continue', 1);
- openSelector('c', '');
+ openSelector('c', '');
}
);
@@ -35,7 +35,7 @@
Request.progressText = '';
var $is_catalog = true;
- var $Catalog = new Catalog('', 'catalog_', 'Catalog');
+ var $Catalog = new Catalog('', 'catalog_', 'Catalog');
$Catalog.TabByCategory = truefalse;
var a_toolbar = new ToolBar();
@@ -220,7 +220,7 @@
function executeButton($button_name) {
switch ($button_name) {
case 'editcat':
- var $edit_url = '';
+ var $edit_url = '';
var $category_id = get_hidden_field('m_cat_id');
var $redirect_url = $edit_url.replace('#CATEGORY_ID#', $category_id);
$redirect_url = $redirect_url.replace('#TEMPLATE#', $category_id == 0 || $category_id == ? 'categories/categories_edit_permissions' : 'categories/categories_edit');
@@ -241,7 +241,7 @@
break;
case 'rebuild_cache':
- openSelector('c', '');
+ openSelector('c', '');
break;
case 'recalculate_priorities':
@@ -290,7 +290,7 @@
var $menu_frame = getFrame('menu');
if (typeof $menu_frame.ShowStructure != 'undefined') {
- $menu_frame.ShowStructure('', true);
+ $menu_frame.ShowStructure('', true);
}
Application.setHook(
\ No newline at end of file
Index: core/admin_templates/tools/import1.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/admin_templates/tools/import1.tpl (revision 15908)
+++ core/admin_templates/tools/import1.tpl (revision )
@@ -14,7 +14,7 @@
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '', function() {
- location.href = '';
+ location.href = '';
}
) );
\ No newline at end of file
Index: core/admin_templates/mailing_lists/send_queue.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/admin_templates/mailing_lists/send_queue.tpl (revision 15916)
+++ core/admin_templates/mailing_lists/send_queue.tpl (revision )
@@ -6,10 +6,10 @@
\ No newline at end of file
Index: core/units/helpers/ajax_form_helper.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/units/helpers/ajax_form_helper.php (revision 15908)
+++ core/units/helpers/ajax_form_helper.php (revision )
@@ -134,10 +134,7 @@
}
else {
if ( !isset($params['redirect_to']) && ($event->redirect === true || strlen($event->redirect) > 0) ) {
- $redirect_to = $this->Application->HREF($event->redirect, '', $event->getRedirectParams(), $event->redirectScript);
-
- // is used from JavaScript / redirecting, so any "&" could break it
- $params['redirect_to'] = str_replace(Array ('&', '%5C'), Array ('&', '\\'), $redirect_to);
+ $params['redirect_to'] = $this->Application->HREF($event->redirect, '', $event->getRedirectParams(), $event->redirectScript);
}
$params = array_merge($params, $event->getRedirectParams());
\ No newline at end of file
Index: core/admin_templates/head.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/admin_templates/head.tpl (revision 15908)
+++ core/admin_templates/head.tpl (revision )
@@ -5,7 +5,7 @@
@@ -22,7 +22,7 @@
@@ -50,7 +50,7 @@
##-->
-
+
@@ -81,10 +81,10 @@
|
- " target="_parent">
+
|
@@ -119,7 +119,7 @@
}
- $FrameResizer = new FrameResizer('', '', window.parent, '', );
+ $FrameResizer = new FrameResizer('', '', window.parent, '', );
$FrameResizer.InitControls($FrameResizer);
$FrameResizer.SetStatus(01);
\ No newline at end of file
Index: core/kernel/db/db_event_handler.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/kernel/db/db_event_handler.php (revision 15943)
+++ core/kernel/db/db_event_handler.php (revision )
@@ -631,7 +631,7 @@
if ( MOD_REWRITE ) {
$redirect_params = Array (
'm_cat_id' => 0,
- 'next_template' => kUtil::escape('external:' . $_SERVER['REQUEST_URI'], kUtil::ESCAPE_URL),
+ 'next_template' => 'external:' . $_SERVER['REQUEST_URI'],
);
}
else {
@@ -1841,7 +1841,7 @@
$simultaneous_edit_message = $this->Application->GetVar('_simultaneous_edit_message');
if ( $simultaneous_edit_message ) {
- $event->SetRedirectParam('_simultaneous_edit_message', kUtil::escape($simultaneous_edit_message, kUtil::ESCAPE_URL));
+ $event->SetRedirectParam('_simultaneous_edit_message', $simultaneous_edit_message);
}
}
\ No newline at end of file
Index: core/admin_templates/import/import_complete.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/admin_templates/import/import_complete.tpl (revision 15908)
+++ core/admin_templates/import/import_complete.tpl (revision )
@@ -29,7 +29,7 @@
- " class="button" onclick="window.location.href='';"/>
+ " class="button" onclick="window.location.href='';"/>
|
\ No newline at end of file
Index: core/units/content/content_eh.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/units/content/content_eh.php (revision 15946)
+++ core/units/content/content_eh.php (revision )
@@ -81,7 +81,7 @@
$transit_params = $fck_helper->getTransitParams();
foreach ($transit_params as $param_name => $param_value) {
- $event->SetRedirectParam($param_name, kUtil::escape($param_value, kUtil::ESCAPE_URL));
+ $event->SetRedirectParam($param_name, $param_value);
}
}
\ No newline at end of file
Index: core/admin_templates/categories/categories_edit_permissions.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/admin_templates/categories/categories_edit_permissions.tpl (revision 15908)
+++ core/admin_templates/categories/categories_edit_permissions.tpl (revision )
@@ -66,7 +66,7 @@
set_hidden_field('t', $prev_template);
}
- var $PermManager = new Catalog('', 'permmanager_', 'CategoryPermissionEditor');
+ var $PermManager = new Catalog('', 'permmanager_', 'CategoryPermissionEditor');
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '', function() {
\ No newline at end of file
Index: core/admin_templates/tools/restore4.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/admin_templates/tools/restore4.tpl (revision 15908)
+++ core/admin_templates/tools/restore4.tpl (revision )
@@ -9,7 +9,7 @@
@@ -715,7 +715,7 @@
- GridScrollers[''].SaveURL = '';
+ GridScrollers[''].SaveURL = '';
// 2. scan grid (only when using selector)
\ No newline at end of file
Index: core/admin_templates/import/import_progress.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/admin_templates/import/import_progress.tpl (revision 15908)
+++ core/admin_templates/import/import_progress.tpl (revision )
@@ -9,12 +9,12 @@
@@ -242,7 +242,7 @@
$me.prop('disabled', true).removeClass('button').addClass('button-disabled');
$.post(
- '',
+ '',
{
key: $('#memory_cache_key_name').val()
},
@@ -281,7 +281,7 @@
$me.prop('disabled', true).removeClass('button').addClass('button-disabled');
$.post(
- '',
+ '',
{
key: $('#memory_cache_key_name').val(),
value: $('#memory_cache_key_value').val()
Index: core/admin_templates/catalog/item_selector/item_selector_catalog.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/admin_templates/catalog/item_selector/item_selector_catalog.tpl (revision 15908)
+++ core/admin_templates/catalog/item_selector/item_selector_catalog.tpl (revision )
@@ -15,7 +15,7 @@
"/>
\ No newline at end of file
Index: core/units/admin/admin_tag_processor.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/units/admin/admin_tag_processor.php (revision 15943)
+++ core/units/admin/admin_tag_processor.php (revision )
@@ -91,7 +91,6 @@
$params['deep_level'] = $deep_level++;
$template = $section_data['url']['t'];
unset($section_data['url']['t']);
- $section_data['url']['__URLENCODE__'] = 1;
$section_data['section_url'] = $this->Application->HREF($template, '', $section_data['url']);
$ret .= $this->Application->ParseBlock( array_merge($params, $section_data) );
@@ -206,7 +205,6 @@
$url_params = $section_data['url'];
unset($url_params['t']);
- $url_params['__URLENCODE__'] = 1;
$section_data['section_url'] = $this->Application->HREF($section_data['url']['t'], '', $url_params);
$ret = $this->Application->ParseBlock( array_merge($params, $section_data) );
@@ -285,7 +283,6 @@
// remove template, so it doesn't appear as additional parameter in url
$template = $section_data['url']['t'];
unset($section_data['url']['t']);
- $section_data['url']['__URLENCODE__'] = 1;
$section_data['section_url'] = $this->Application->HREF($template, '', $section_data['url']);
@@ -476,7 +473,7 @@
$params['t'] = 'catalog/item_selector/item_selector_'.$mode;
$params['m_cat_id'] = $this->Application->getBaseCategory();
- $default_params = Array('no_amp' => 1, 'pass' => 'all,'.$params['prefix']);
+ $default_params = Array('pass' => 'all,'.$params['prefix']);
unset($params['prefix']);
$pass_through = Array();
@@ -1196,4 +1193,4 @@
return $this->Application->ParseBlock($block_params);
}
- }
+ }
\ No newline at end of file
Index: core/admin_templates/tools/compile_templates.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/admin_templates/tools/compile_templates.tpl (revision 15908)
+++ core/admin_templates/tools/compile_templates.tpl (revision )
@@ -8,10 +8,10 @@
\ No newline at end of file
Index: core/units/admin/admin_config.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/units/admin/admin_config.php (revision 15941)
+++ core/units/admin/admin_config.php (revision )
@@ -58,7 +58,7 @@
'parent' => null,
'icon' => 'site',
'label' => 'SITE_NAME',
- 'url' => Array ('t' => 'index', 'pass' => 'm', 'pass_section' => true, 'no_amp' => 1),
+ 'url' => Array ('t' => 'index', 'pass' => 'm'),
'permissions' => Array ('view'),
'priority' => 0,
'container' => true,
\ No newline at end of file
Index: core/kernel/managers/plain_url_processor.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/kernel/managers/plain_url_processor.php (revision 15908)
+++ core/kernel/managers/plain_url_processor.php (revision )
@@ -31,14 +31,10 @@
return Array ('t' => $this->manager->getTemplateName());
}
- $vars = Array ();
- $more_vars = strpos($env_var, '&');
+ parse_str(ENV_VAR_NAME . '=' . $env_var, $vars);
+ $env_var = $vars[ENV_VAR_NAME];
+ unset($vars[ENV_VAR_NAME]);
- if ( $more_vars !== false ) {
- parse_str(substr($env_var, $more_vars + 1), $vars);
- $env_var = substr($env_var, 0, $more_vars);
- }
-
// replace escaped ":" symbol not to explode by it
$env_var = str_replace('\:', '_&+$$+&_', $env_var); // replace escaped "=" with spec-chars :)
$parts = explode(':', $env_var);
@@ -160,19 +156,6 @@
$ssl = isset($params['__SSL__']) ? $params['__SSL__'] : 0;
$sid = isset($params['sid']) && !$this->Application->RewriteURLs($ssl) ? $params['sid'] : '';
- $ret = '';
- if ( $env_var ) {
- $ret = ENV_VAR_NAME . '=';
- }
-
- $ret .= $sid . '-'; // SID-TEMPLATE
-
- $encode = false;
- if ( isset($params['__URLENCODE__']) ) {
- $encode = $params['__URLENCODE__'];
- unset($params['__URLENCODE__']);
- }
-
if ( isset($params['__SSL__']) ) {
unset($params['__SSL__']);
}
@@ -214,29 +197,15 @@
}
}
- $ret .= $t . ':' . $this->BuildModuleEnv('m', $params, $pass_events) . $env_string;
-
+ $env_string = $sid . '-' . $t . ':' . $this->BuildModuleEnv('m', $params, $pass_events) . $env_string;
unset($params['pass'], $params['opener'], $params['m_event']);
+ $params = array(ENV_VAR_NAME => $env_string) + $params;
- // TODO: tag, which uses resulting url should do escaping
- if ( array_key_exists('escape', $params) && $params['escape'] ) {
- $ret = kUtil::escape($ret, kUtil::ESCAPE_JS);
- unset($params['escape']);
- }
+ $params_str = http_build_query($params);
+ $ret = str_replace('%23', '#', $params_str);
- if ( $params ) {
- $params_str = '';
- $join_string = $encode ? '&' : '&';
-
- foreach ($params as $param => $value) {
- $params_str .= $join_string . $param . '=' . $value;
- }
-
- $ret .= $params_str;
- }
-
- if ( $encode ) {
- $ret = str_replace('\\', '%5C', $ret);
+ if ( !$env_var ) {
+ $ret = substr($ret, strlen(ENV_VAR_NAME) + 1);
}
return $ret;
\ No newline at end of file
Index: core/admin_templates/incs/form_blocks.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/admin_templates/incs/form_blocks.tpl (revision 15914)
+++ core/admin_templates/incs/form_blocks.tpl (revision )
@@ -370,9 +370,9 @@
names : '',
sizes : '',
flashsid : '',
- uploadURL : '',
- deleteURL : '',
- previewURL : '',
+ uploadURL : '',
+ deleteURL : '',
+ previewURL : '',
// Button settings
buttonImageURL: 'img/upload.png', // Relative to the Flash file
@@ -740,7 +740,7 @@
var $type = $( jq('#') ).val();
if ( !isNaN( parseInt($type) ) ) {
- var $url = '';
+ var $url = '';
return $url.replace('#VALUE#', encodeURIComponent(cur_value)).replace('#TYPE#', encodeURIComponent($type));
}
@@ -1010,7 +1010,7 @@
\ No newline at end of file
Index: core/admin_templates/promo_blocks/promo_block_list.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/admin_templates/promo_blocks/promo_block_list.tpl (revision 15908)
+++ core/admin_templates/promo_blocks/promo_block_list.tpl (revision )
@@ -119,7 +119,7 @@
'tools',
'',
function () {
- direct_edit('promo-block', '');
+ direct_edit('promo-block', '');
}
)
);
Index: core/admin_templates/js/script.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/admin_templates/js/script.js (revision 15908)
+++ core/admin_templates/js/script.js (revision )
@@ -366,7 +366,7 @@
set_hidden_field('events[trans]', 'OnLoad');
var $regex = new RegExp('(.*)\?env=(' + document.getElementById('sid').value + ')?-(.*?):(.*)');
- var $t = $regex.exec(url)[3];
+ var $t = $regex.exec(rawurldecode(url))[3];
$kf.target = wnd;
submit_event(prefix, '', $t, url);
@@ -549,7 +549,7 @@
function openSelector($prefix, $url, $dst_field, $window_size, $event) {
// get template name from url
var $regex = new RegExp('(.*)\?env=(' + document.getElementById('sid').value + ')?-(.*?):(m[^:]+)');
- $regex = $regex.exec($url);
+ $regex = $regex.exec(rawurldecode($url));
var $t = $regex[3];
@@ -1839,7 +1839,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/g, '\\') + '&merge_opener_stack=1');
+ openSelector('adm', $ru + '&merge_opener_stack=1');
},
200
);
@@ -1850,7 +1850,7 @@
window.focus();
if ( !(($force_skip_refresh === true) || (typeof $skip_refresh != 'undefined' && $skip_refresh)) ) {
- window.location.href = $redirect_url.replace(/%5C/g, '\\');
+ window.location.href = rawurldecode($redirect_url);
}
}
@@ -1859,6 +1859,20 @@
$prepend = $prepend !== undefined ? $prepend + '_' : '';
return document.getElementById($prepend + $mask.replace('#FIELD_NAME#', $field) + $append);
+}
+
+function rawurldecode(str) {
+
+ if ( str.indexOf('?') != -1 ) {
+ var $parts = str.split('?', 2);
+
+ return $parts[0] + ($parts.length == 2 ? '?' + rawurldecode($parts[1]) : '');
+ }
+
+ return decodeURIComponent((str + '').replace(/%(?![\da-f]{2})/gi, function () {
+ // PHP tolerates poorly formed escape sequences
+ return '%25';
+ }));
}
Array.prototype.each = function ($callback) {