document.close() in document.write()

Consider (warning: test case freezes IE8 beta2 if XSS filter by-passed):
http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cscript%3Edocument.write(%22%3Cscript%3Edocument.write(%27a%27)%3Bdocument.close()%3B%3C%5C%2Fscript%3EEND%22)%3B%3C%2Fscript%3E

Compare with:
http://www.whatwg.org/specs/web-apps/current-work/#dom-document-close

document.close() in Gecko/WebKit/Opera does not insert an explicit EOF  
at insertion point. Instead, it marks the parser stream as no longer  
accepting more writes, but previously written pending data is still  
tokenized.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/

Received on Wednesday, 19 November 2008 11:24:53 UTC