Bug 599584 - Do not let nsContentSink process <meta> tags when parsing an HTML fragment. r=bzbarsky, a=blocking2.0-betaN.

This commit is contained in:
Henri Sivonen
2010-10-13 10:12:55 +03:00
parent 4440b253f5
commit 533ff1a58b
4 changed files with 61 additions and 1 deletions

View File

@@ -552,7 +552,7 @@ nsHtml5TreeBuilder::elementPopped(PRInt32 aNamespace, nsIAtom* aName, nsIContent
treeOp->Init(eTreeOpDoneCreatingElement, aElement);
return;
}
if (aName == nsHtml5Atoms::meta) {
if (aName == nsHtml5Atoms::meta && !fragment) {
nsHtml5TreeOperation* treeOp = mOpQueue.AppendElement();
NS_ASSERTION(treeOp, "Tree op allocation failed.");
treeOp->Init(eTreeOpProcessMeta, aElement);