From 01a99739f8cd3c2e7542ff842ee4e5f189c98543 Mon Sep 17 00:00:00 2001 From: "mrbkap%gmail.com" Date: Mon, 25 Oct 2004 23:33:04 +0000 Subject: [PATCH] bug 256731: unclosed userdefined tags inside phrasal tags cause the phrasal tags to be unable to close. r=rbs sr=bzbarsky git-svn-id: svn://10.0.0.236/trunk@164399 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/parser/htmlparser/src/nsElementTable.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mozilla/parser/htmlparser/src/nsElementTable.cpp b/mozilla/parser/htmlparser/src/nsElementTable.cpp index 3a6f50ef71a..7a5242b4f4f 100644 --- a/mozilla/parser/htmlparser/src/nsElementTable.cpp +++ b/mozilla/parser/htmlparser/src/nsElementTable.cpp @@ -2069,8 +2069,12 @@ eHTMLTags nsHTMLElement::GetCloseTargetForEndTag(nsDTDContext& aContext,PRInt32 if(IsMemberOf(kPhrase)){ while((--theIndex>=anIndex) && (eHTMLTag_unknown==result)){ - eHTMLTags theTag=aContext.TagAt(theIndex); - if(theTag!=mTagID) { + eHTMLTags theTag = aContext.TagAt(theIndex); + if(theTag != mTagID) { + // Allow phrasals to close userdefined tags. bug 256731 + if(eHTMLTag_userdefined == theTag) { + continue; // We can close this. + } //fixes a derivative of bug 22842... if(CanContainType(kBlock)) { //INS/DEL can contain blocks.