Fix for bug 88761 (html code for selected and noshade (and other minimizable attributes) not w3c conformant). r=heikki, sr=jst.

git-svn-id: svn://10.0.0.236/trunk@122219 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterv%netscape.com
2002-05-28 12:34:48 +00:00
parent bff765059c
commit aab00646c0
3 changed files with 112 additions and 1 deletions

View File

@@ -55,6 +55,7 @@
#include "nsEscape.h"
#include "nsITextToSubURI.h"
#include "nsCRT.h"
#include "nsIHTMLContent.h"
static NS_DEFINE_CID(kParserServiceCID, NS_PARSERSERVICE_CID);
@@ -395,7 +396,7 @@ nsHTMLContentSerializer::SerializeAttributes(nsIContent* aContent,
if (!isJS && NS_FAILED(EscapeURI(tempURI, valueStr)))
valueStr = tempURI;
}
attrName->ToString(nameStr);
/*If we already crossed the MaxColumn limit or
@@ -408,6 +409,10 @@ nsHTMLContentSerializer::SerializeAttributes(nsIContent* aContent,
mColPos = 0;
}
// Expand shorthand attribute.
if (IsShorthandAttr(attrName, aTagName) && valueStr.IsEmpty()) {
valueStr = nameStr;
}
SerializeAttr(nsAutoString(), nameStr, valueStr, aStr, !isJS);
}
}