Changeset 662


Ignore:
Timestamp:
01/16/07 03:56:32 (13 years ago)
Author:
gogo
Message:

ticket:551 - shape and coord attributes of area element are ignored by
IE. Who knows how many other attributes are ignored by IE!

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/testbed.html

    r661 r662  
    153153      </head> 
    154154      <body> 
     155      <img src="http://xinha.python-hosting.com/trac/logo.jpg" usemap="#m1"> 
     156      <map name="m1"> 
     157      <area shape="rect" coords="137,101,255,124" href="http://www.mydomain.com"> 
     158      </map> 
     159 
    155160      <p> 
    156161        Lorem ipsum dolor sit amet, consectetuer adipiscing elit. 
  • trunk/getHTML.js

    r649 r662  
    99  } 
    1010  catch(ex) 
    11   { 
     11  {    
    1212    alert(Xinha._lc('Your Document is not well formed. Check JavaScript console for details.')); 
    1313    return editor._iframe.contentWindow.document.body.innerHTML; 
     
    9292        html += (Xinha.is_ie && Xinha.isBlockElement(root) ? ('\n' + indent) : '') + "<" + root.tagName.toLowerCase(); 
    9393        var attrs = root.attributes; 
     94         
    9495        for ( i = 0; i < attrs.length; ++i ) 
    9596        { 
    9697          var a = attrs.item(i); 
    97           if ( !a.specified && !(root.tagName.toLowerCase().match(/input|option/) && a.nodeName == 'value') ) 
     98          if ( !a.specified  
     99            // IE claims these are !a.specified even though they are.  Perhaps others too? 
     100            && !(root.tagName.toLowerCase().match(/input|option/) && a.nodeName == 'value')                 
     101            && !(root.tagName.toLowerCase().match(/area/) && a.nodeName.match(/shape|coords/i))  
     102          ) 
    98103          { 
    99104            continue; 
Note: See TracChangeset for help on using the changeset viewer.