Index: branches/5.3.x/core/admin_templates/js/toolbar.js =================================================================== diff -u -N -r15902 -r15907 --- branches/5.3.x/core/admin_templates/js/toolbar.js (.../toolbar.js) (revision 15902) +++ branches/5.3.x/core/admin_templates/js/toolbar.js (.../toolbar.js) (revision 15907) @@ -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() {