Ticket #2528657 (closed defect)

Reporter


Nathan Walther
Opened: 02/25/10
Last modified: 09/7/10
Status: closed
Type: defect
Resolution: fixed

Owner


Adam Moore
Target Release: 3.2.0
Priority: P3 (normal)
Summary: purge fails in IE6 if base tag is self-closing
Description:

The statement h.removeChild(node) of Y.Get._purge fails in IE6 with "htmlfile: Invalid argument." if the document head contains a self-closing base tag:


<base href="http://example.com/bug.html" />

It's obviously an IE6 defect, but the bug was difficult to diagnose so I'd like to make a record of it for other YUI users. The workaround is simply to explicitly close the base tag:


<base href="http://example.com/bug.html"></base>

Type: defect Observed in Version: 3.0.0
Component: Get Utility Severity: S4 (low)
Assigned To: Adam Moore Target Release: 3.2.0
Location: Library Code Priority: P3 (normal)
Tags: Relates To:
Browsers: IE 6.x
URL:
Test Information:

Steps to reproduce:
1. add a base tag to the head but do not explicitly close it with </base>
2. Y.use modules with a total of more than purgethreshold script dependencies, without combining requests.

I initially reproduced this with a valid XHTML document. For brevity here's the minimal HTML to reproduce this, with an implicitly-closed base tag:


<html>
<head>
<base href="http://example.com/bug.html">
<script type="text/javascript" src="http://yui.yahooapis.com/3.0.0/build/yui/yui-debug.js"></script>
</head>
<body>
<script type="text/javascript">
YUI({ combine: false }).use('anim', 'datasource');
</script>
</body>
</html>

Attachments

Attachment #1: purgebug.html (download)

Change History

George

YUI Developer

Posted: 02/25/10
  • component changed from None to Node
  • owner changed from George to Matt Sweeney
  • priority changed to P3 (normal)
  • status changed from new to assigned

Matt Sweeney

YUI Developer

Posted: 03/3/10
  • location changed to Library Code
  • milestone changed to 3.NEXT
  • status changed from assigned to accepted

Adam Moore

YUI Contributor

Posted: 04/29/10
  • component changed from Node to Get Utility
  • milestone changed from 3.NEXT to 3.2.0
  • owner changed from Matt Sweeney to Adam Moore
  • status changed from accepted to assigned

Adam Moore

YUI Contributor

Posted: 04/29/10

Need to test to see if the problem occurs when the nodes are inserted and removed above the self-closing base tag.

Adam Moore

YUI Contributor

Posted: 06/30/10
  • status changed from assigned to accepted

Adam Moore

YUI Contributor

Posted: 07/19/10
  • status changed from accepted to checkedin

Adam Moore

YUI Contributor

Posted: 07/20/10
  • resolution changed to fixed

script tag insert default is above a base tag if it exists to handle IE
bug when trying to remove the nodes [fixes #2528657].
View Commit:

George

YUI Developer

Posted: 09/7/10
  • status changed from checkedin to closed