Index: branches/5.2.x/core/kernel/languages/phrases_cache.php =================================================================== diff -u -N -r15856 -r15905 --- branches/5.2.x/core/kernel/languages/phrases_cache.php (.../phrases_cache.php) (revision 15856) +++ branches/5.2.x/core/kernel/languages/phrases_cache.php (.../phrases_cache.php) (revision 15905) @@ -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.2.x/core/kernel/processors/main_processor.php =================================================================== diff -u -N -r15856 -r15905 --- branches/5.2.x/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 15856) +++ branches/5.2.x/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 15905) @@ -1,6 +1,6 @@ - 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.2.x/core/admin_templates/js/script.js =================================================================== diff -u -N -r15858 -r15905 --- branches/5.2.x/core/admin_templates/js/script.js (.../script.js) (revision 15858) +++ branches/5.2.x/core/admin_templates/js/script.js (.../script.js) (revision 15905) @@ -961,6 +961,15 @@ // $grid.Resize( $grid.GetAutoSize() ); } +function htmlspecialchars_decode(string) { + string = string.toString().replace(/</g, '<').replace(/>/g, '>'); + string = string.replace(/�*39;/g, "'"); + string = string.replace(/"/g, '"'); + string = string.replace(/&/g, '&'); + + return string; +} + function RemoveTranslationLink($string, $escaped) { if ( !isset($escaped) ) $escaped = true; Index: branches/5.2.x/core/admin_templates/js/toolbar.js =================================================================== diff -u -N -r15726 -r15905 --- branches/5.2.x/core/admin_templates/js/toolbar.js (.../toolbar.js) (revision 15726) +++ branches/5.2.x/core/admin_templates/js/toolbar.js (.../toolbar.js) (revision 15905) @@ -3,10 +3,10 @@ this.Title = title || ''; this.TranslateLink = false; this.CheckTitleModule(); - this.Alt = RemoveTranslationLink(alt || ''); + this.Alt = RemoveTranslationLink(alt || '', false); if (this.Alt != alt) { this.TranslateLink = alt || ''; - this.TranslateLink = this.TranslateLink.replace(/<a href="(.*?)".*>(.*?)<\/a>/g, '$1'); + this.TranslateLink = this.TranslateLink.replace(/(.*?)<\/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() {