This is a bug in the HTML tokenizer's discardLF feature, in the HTMLTokenizer::write function. We need to clear the discardLF flag in two cases where we don't today: Entity processing and tag processing.
<rdar://problem/5951986>
Only tag processing, not entity processing.
Created attachment 21463 [details] patch
Comment on attachment 21463 [details] patch r=me
Committed revision 34311.