Changeset 793


Ignore:
Timestamp:
03/22/07 17:12:07 (12 years ago)
Author:
ray
Message:

Ticket #988 elements that have some javascript event hard coded in it's TAG is still enabled in WYSIWYG mode

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/XinhaCore.js

    r792 r793  
    41934193  html = html.replace(/<(\/?)strike(\s|>|\/)/ig, "<$1del$2"); 
    41944194   
    4195   // replace window.open to that any clicks won't open a popup in designMode 
    4196   html = html.replace("onclick=\"try{if(document.designMode &amp;&amp; document.designMode == 'on') return false;}catch(e){} window.open(", "onclick=\"window.open("); 
     4195  // remove disabling of inline event handle inside Xinha iframe 
     4196  html = html.replace(/(<[^>]*onclick=['"])if\(window\.top &amp;&amp; window\.top\.Xinha\)\{return false\}/gi,'$1'); 
     4197  html = html.replace(/(<[^>]*onmouseover=['"])if\(window\.top &amp;&amp; window\.top\.Xinha\)\{return false\}/gi,'$1'); 
     4198  html = html.replace(/(<[^>]*onmouseout=['"])if\(window\.top &amp;&amp; window\.top\.Xinha\)\{return false\}/gi,'$1'); 
     4199  html = html.replace(/(<[^>]*onmousedown=['"])if\(window\.top &amp;&amp; window\.top\.Xinha\)\{return false\}/gi,'$1'); 
     4200  html = html.replace(/(<[^>]*onmouseup=['"])if\(window\.top &amp;&amp; window\.top\.Xinha\)\{return false\}/gi,'$1'); 
     4201 
    41974202 
    41984203  // Figure out what our server name is, and how it's referenced 
     
    42454250  html = html.replace(/<(\/?)del(\s|>|\/)/ig, "<$1strike$2"); 
    42464251 
    4247   // replace window.open to that any clicks won't open a popup in designMode 
    4248   html = html.replace("onclick=\"window.open(", "onclick=\"try{if(document.designMode &amp;&amp; document.designMode == 'on') return false;}catch(e){} window.open("); 
    4249  
     4252  // disable inline event handle inside Xinha iframe 
     4253  html = html.replace(/(<[^>]*onclick=["'])/gi,'$1if(window.top &amp;&amp; window.top.Xinha){return false}'); 
     4254  html = html.replace(/(<[^>]*onmouseover=["'])/gi,'$1if(window.top &amp;&amp; window.top.Xinha){return false}'); 
     4255  html = html.replace(/(<[^>]*onmouseout=["'])/gi,'$1if(window.top &amp;&amp; window.top.Xinha){return false}'); 
     4256  html = html.replace(/(<[^>]*onmouseodown=["'])/gi,'$1if(window.top &amp;&amp; window.top.Xinha){return false}'); 
     4257  html = html.replace(/(<[^>]*onmouseup=["'])/gi,'$1if(window.top &amp;&amp; window.top.Xinha){return false}'); 
     4258   
    42504259  html = this.inwardSpecialReplacements(html); 
    42514260 
  • trunk/plugins/Linker/linker.js

    r731 r793  
    182182           values.p_options.push('height=' + values.p_height); 
    183183         } 
    184          atr.onclick = 'try{if(document.designMode && document.designMode == \'on\') return false;}catch(e){} window.open(this.href, \'' + (values.p_name.replace(/[^a-z0-9_]/i, '_')) + '\', \'' + values.p_options.join(',') + '\');return false;'; 
     184         atr.onclick = 'if(window.top && window.top.Xinha){return false}window.open(this.href, \'' + (values.p_name.replace(/[^a-z0-9_]/i, '_')) + '\', \'' + values.p_options.join(',') + '\');return false;'; 
    185185       } 
    186186     } 
Note: See TracChangeset for help on using the changeset viewer.