fix for 73605: nsHTMLContentSerializer outputs <textarea> contents as attributes
r=kin@netscape.com sr=jst@netscape.com a=dbaron git-svn-id: svn://10.0.0.236/trunk@97412 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -263,6 +263,14 @@ nsHTMLContentSerializer::SerializeAttributes(nsIContent* aContent,
|
||||
(valueStr.EqualsWithConversion(kMozStr, PR_FALSE, sizeof(kMozStr)-1))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// XXX: This special cased textarea code should be
|
||||
// removed when bug #17003 is fixed.
|
||||
if ( (aTagName == nsHTMLAtoms::textarea) &&
|
||||
((attrName.get() == nsHTMLAtoms::value) ||
|
||||
(attrName.get() == nsHTMLAtoms::defaultvalue)) ){
|
||||
continue;
|
||||
}
|
||||
|
||||
if (((attrName.get() == nsHTMLAtoms::href) ||
|
||||
(attrName.get() == nsHTMLAtoms::src))) {
|
||||
@@ -347,6 +355,15 @@ nsHTMLContentSerializer::AppendElementStart(nsIDOMElement *aElement,
|
||||
mColPos = 0;
|
||||
}
|
||||
|
||||
// XXX: This special cased textarea code should be
|
||||
// removed when bug #17003 is fixed.
|
||||
if (name.get() == nsHTMLAtoms::textarea)
|
||||
{
|
||||
nsAutoString valueStr;
|
||||
content->GetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::value, valueStr);
|
||||
AppendToString(valueStr, aStr);
|
||||
}
|
||||
|
||||
if ((name.get() == nsHTMLAtoms::script) ||
|
||||
(name.get() == nsHTMLAtoms::style) ||
|
||||
(name.get() == nsHTMLAtoms::noscript)) {
|
||||
|
||||
Reference in New Issue
Block a user