Index: branches/5.3.x/core/kernel/processors/main_processor.php
===================================================================
diff -u -r15902 -r15907
--- branches/5.3.x/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 15902)
+++ branches/5.3.x/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 15907)
@@ -1,6 +1,6 @@
(.*?)<\/a>/g, '$1');
}
if (this.Alt.match(/(.*)::(.*)/)) {
@@ -111,33 +111,28 @@
}
ToolBarButton.prototype.EditTitle = function() {
- if (this.TranslateLink !== false && !this.ReadOnly) {
- var $links = this.TranslateLink;
+ if ( this.TranslateLink === false || this.ReadOnly ) {
+ return true;
+ }
- $links = $links.split('::');
- var $i = 0;
- while ($i < $links.length) {
- var $link = $links[$i];
- if ($link.match(/(javascript:|http:\/\/)(.*)/)) {
- var $link_type = RegExp.$1;
- $link = RegExp.$2.replace(/[0]{0,1}39;/g, '"');
- if ($link_type == 'javascript:') {
- eval($link);
- }
- else {
- window.location.href = 'http://' + $link;
- }
+ var $link = '',
+ $links = this.TranslateLink.split('::');
- // edit one phrase at a time
- break;
- }
- $i++;
- }
+ // edit one phrase at a time
+ for ( var $i = 0; $i < $links.length; $i++ ) {
+ $link = htmlspecialchars_decode($links[$i]);
- return false;
+ if ( $link.match(/^javascript:(.*)/) ) {
+ eval(RegExp.$1);
+ break;
+ }
+ else if ( $link.match(/^http:\/\/(.*)/) ) {
+ window.location.href = 'http://' + RegExp.$1;
+ break;
+ }
}
- return true;
+ return false;
}
ToolBarButton.prototype.SetOnMouseOver = function() {
Index: branches/5.3.x/core/admin_templates/catalog/catalog.tpl
===================================================================
diff -u -r15483 -r15907
--- branches/5.3.x/core/admin_templates/catalog/catalog.tpl (.../catalog.tpl) (revision 15483)
+++ branches/5.3.x/core/admin_templates/catalog/catalog.tpl (.../catalog.tpl) (revision 15907)
@@ -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(
Index: branches/5.3.x/core/kernel/languages/phrases_cache.php
===================================================================
diff -u -r15902 -r15907
--- branches/5.3.x/core/kernel/languages/phrases_cache.php (.../phrases_cache.php) (revision 15902)
+++ branches/5.3.x/core/kernel/languages/phrases_cache.php (.../phrases_cache.php) (revision 15907)
@@ -1,6 +1,6 @@
'#LABEL#',
'phrases_event' => 'OnPreparePhrase',
'next_template' => kUtil::escape('external:' . $_SERVER['REQUEST_URI'], kUtil::ESCAPE_URL),
+ '__URLENCODE__' => 1,
'pass' => 'm,phrases'
);
Index: branches/5.3.x/core/admin_templates/tree.tpl
===================================================================
diff -u -r15902 -r15907
--- branches/5.3.x/core/admin_templates/tree.tpl (.../tree.tpl) (revision 15902)
+++ branches/5.3.x/core/admin_templates/tree.tpl (.../tree.tpl) (revision 15907)
@@ -47,9 +47,9 @@
- - debug_only="1"
>
+ - debug_only="1">
- img/icons/icon24_.png" load_url="" debug_only="1">
+ img/icons/icon24_.png" load_url="" debug_only="1">
@@ -66,11 +66,11 @@
};
- var the_tree = new TreeFolder('tree', '', '', 'img/icons/icon24_.png', null, null, '', '');
+ var the_tree = new TreeFolder('tree', '', '', 'img/icons/icon24_.png', null, null, '', '');
- the_tree.AddFromXML('');
+ the_tree.AddFromXML('');
var fld = the_tree.locateItemByURL('');
Index: branches/5.3.x/core/units/admin/admin_tag_processor.php
===================================================================
diff -u -r15902 -r15907
--- branches/5.3.x/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 15902)
+++ branches/5.3.x/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 15907)
@@ -1,6 +1,6 @@
Application->HREF($template, '', $section_data['url']);
$ret .= $this->Application->ParseBlock( array_merge($params, $section_data) );
if (!isset($section_data['children'])) {
@@ -205,6 +207,7 @@
$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) );
@@ -283,6 +286,7 @@
// 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']);
Index: branches/5.3.x/core/admin_templates/catalog/advanced_view.tpl
===================================================================
diff -u -r15483 -r15907
--- branches/5.3.x/core/admin_templates/catalog/advanced_view.tpl (.../advanced_view.tpl) (revision 15483)
+++ branches/5.3.x/core/admin_templates/catalog/advanced_view.tpl (.../advanced_view.tpl) (revision 15907)
@@ -130,7 +130,7 @@
var $menu_frame = getFrame('menu');
if (typeof $menu_frame.ShowStructure != 'undefined') {
- $menu_frame.ShowStructure('', false);
+ $menu_frame.ShowStructure('', false);
}
Application.setHook(
Index: branches/5.3.x/index.php
===================================================================
diff -u -r15902 -r15907
--- branches/5.3.x/index.php (.../index.php) (revision 15902)
+++ branches/5.3.x/index.php (.../index.php) (revision 15907)
@@ -1,6 +1,6 @@
');
+ string = string.replace(/*39;/g, "'");
+ string = string.replace(/"/g, '"');
+ string = string.replace(/&/g, '&');
+
+ return string;
+}
+
function RemoveTranslationLink($string, $escaped) {
if ( !isset($escaped) ) $escaped = true;
|