Changeset 909


Ignore:
Timestamp:
10/20/07 19:30:54 (12 years ago)
Author:
wymsy
Message:

better fix for ticket #1086

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/XinhaCore.js

    r908 r909  
    48454845   
    48464846  // remove disabling of inline event handle inside Xinha iframe 
    4847   html = html.replace(/(<[^>]*onclick=['"])if\(window\.top (&amp;&amp;|&&) window\.top\.Xinha\)\{return false\}/gi,'$1'); 
    4848   html = html.replace(/(<[^>]*onmouseover=['"])if\(window\.top (&amp;&amp;|&&) window\.top\.Xinha\)\{return false\}/gi,'$1'); 
    4849   html = html.replace(/(<[^>]*onmouseout=['"])if\(window\.top (&amp;&amp;|&&) window\.top\.Xinha\)\{return false\}/gi,'$1'); 
    4850   html = html.replace(/(<[^>]*onmousedown=['"])if\(window\.top (&amp;&amp;|&&) window\.top\.Xinha\)\{return false\}/gi,'$1'); 
    4851   html = html.replace(/(<[^>]*onmouseup=['"])if\(window\.top (&amp;&amp;|&&) window\.top\.Xinha\)\{return false\}/gi,'$1'); 
    4852  
     4847  html = html.replace(/(<[^>]*on(click|mouse(over|out|up|down))=['"])if\(window\.top &amp;&amp; window\.top\.Xinha\)\{return false\}/gi,'$1'); 
    48534848 
    48544849  // Figure out what our server name is, and how it's referenced 
     
    49114906 
    49124907  // disable inline event handle inside Xinha iframe 
    4913   html = html.replace(/(<[^>]*onclick=["'])/gi,'$1if(window.top &amp;&amp; window.top.Xinha){return false}'); 
    4914   html = html.replace(/(<[^>]*onmouseover=["'])/gi,'$1if(window.top &amp;&amp; window.top.Xinha){return false}'); 
    4915   html = html.replace(/(<[^>]*onmouseout=["'])/gi,'$1if(window.top &amp;&amp; window.top.Xinha){return false}'); 
    4916   html = html.replace(/(<[^>]*onmouseodown=["'])/gi,'$1if(window.top &amp;&amp; window.top.Xinha){return false}'); 
    4917   html = html.replace(/(<[^>]*onmouseup=["'])/gi,'$1if(window.top &amp;&amp; window.top.Xinha){return false}'); 
     4908  html = html.replace(/(<[^>]*on(click|mouse(over|out|up|down))=["'])/gi,'$1if(window.top &amp;&amp; window.top.Xinha){return false}'); 
    49184909   
    49194910  html = this.inwardSpecialReplacements(html); 
  • trunk/modules/GetHtml/TransformInnerHTML.js

    r882 r909  
    4141/*05*/  new RegExp().compile(/(<\w+\s+(\w*="[^"]*"\s+)*)(checked|compact|declare|defer|disabled|ismap|multiple|no(href|resize|shade|wrap)|readonly|selected)([\s>])/gi),//expand singlet attributes 
    4242/*06*/  new RegExp().compile(/(="[^']*)'([^'"]*")/),//check quote nesting 
    43 /*07*/  new RegExp().compile(/&(?=[^<]*>)/g),//expand query ampersands 
     43/*07*/  new RegExp().compile(/&(?=(?!(#[0-9]{2,4};|[a-zA-Z0-9]{2,6};|\\x[0-9a-fA-F]{2};))[^<]*>)/g),//expand query ampersands not in html entities 
    4444/*08*/  new RegExp().compile(/<\s+/g),//strip tagstart whitespace 
    4545/*09*/  new RegExp().compile(/\s+(\/)?>/g),//trim whitespace 
     
    7777                replace(c[4], '<$1$2 />').//terminate singlet tags 
    7878                replace(c[6], '$1$2').//check quote nesting 
    79         //      replace(c[7], '&amp;').//expand query ampersands 
     79                replace(c[7], '&amp;').//expand query ampersands 
    8080                replace(c[8], '<').//strip tagstart whitespace 
    8181                replace(c[10], ' ');//trim extra whitespace 
Note: See TracChangeset for help on using the changeset viewer.