Index: trunk/admin/editor/cmseditor/editor/dialog/fck_link/fck_link.js =================================================================== diff -u -r2549 -r4165 --- trunk/admin/editor/cmseditor/editor/dialog/fck_link/fck_link.js (.../fck_link.js) (revision 2549) +++ trunk/admin/editor/cmseditor/editor/dialog/fck_link/fck_link.js (.../fck_link.js) (revision 4165) @@ -394,7 +394,7 @@ //alert(tmpUrl+' === '+sCmsPage); if (LinkTypeID()) { - if (tmpUrl == SetIDtag(sCmsId) || tmpUrl == SetIDtagAMP(sCmsId) || tmpUrl == SetIDtagNoLtQt(sCmsId)) { + if (EncodeHrefTag(tmpUrl) == SetIDtagEncode(sCmsId)) { GetE('cmbImternalPagName').options[i].selected=1; //alert(ServerPath+sCmsPage+GetAdmin()); window.frames["frmInternal"].document.location.href = ServerPath+sCmsPage+GetAdmin(); @@ -420,6 +420,11 @@ return false; } +function SetIDtagEncode(id) +{ + return "<%cms:GetBlockData id='"+id+"' field='href'%>"; +} + function SetIDtagNoLtQt(id) { return "<%cms:GetBlockData id='"+id+"' field='href'%>"; @@ -432,7 +437,6 @@ function SetIDtagAMP(id) { return "&lt;%cms:GetBlockData id='"+id+"' field='href'%&gt;"; - } function ChangeInternalUrl(url,obj) @@ -449,6 +453,28 @@ window.frames["frmInternal"].document.location.href = ServerPath + url+GetAdmin(); } +function EncodeHrefTag(text) +{ + if ( typeof( text ) != "string" ) + text = text.toString() ; + //alert(text); + text = text.replace(/&lt;/g, "<"); + text = text.replace(/</g, "<"); + text = text.replace(/&gt;/g, ">"); + text = text.replace(/>/g, ">"); + text = text.replace(/%27/g, "\'") ; + text = text.replace(/%3C/g, "<") ; + text = text.replace(/%3E/g, ">") ; + text = text.replace(/%&39/g, "\"") ; + text = text.replace(/-/g, "-") ; + text = text.replace(/%20/g, " ") ; + alert(text); + return text ; +} + + + + function GetAdmin() { if (oEditor.FCKConfig.Admin != 'undefined') {