зеркало из https://github.com/mozilla/pjs.git
Fix dataloss bug 134298: SaveAs leaves private -moz attributes in the output; patch=heikki, r=rbs, sr=jst, a=asa
This commit is contained in:
Родитель
2c6fb85dda
Коммит
6b0d922643
|
@ -485,6 +485,7 @@ nsXMLContentSerializer::AppendElementStart(nsIDOMElement *aElement,
|
||||||
namespaceID,
|
namespaceID,
|
||||||
*getter_AddRefs(attrName),
|
*getter_AddRefs(attrName),
|
||||||
*getter_AddRefs(attrPrefix));
|
*getter_AddRefs(attrPrefix));
|
||||||
|
|
||||||
if (attrPrefix) {
|
if (attrPrefix) {
|
||||||
attrPrefix->ToString(prefixStr);
|
attrPrefix->ToString(prefixStr);
|
||||||
}
|
}
|
||||||
|
@ -500,7 +501,13 @@ nsXMLContentSerializer::AppendElementStart(nsIDOMElement *aElement,
|
||||||
|
|
||||||
content->GetAttr(namespaceID, attrName, valueStr);
|
content->GetAttr(namespaceID, attrName, valueStr);
|
||||||
attrName->ToString(nameStr);
|
attrName->ToString(nameStr);
|
||||||
|
|
||||||
|
// XXX Hack to get around the fact that MathML can add
|
||||||
|
// attributes starting with '-', which makes them
|
||||||
|
// invalid XML.
|
||||||
|
if (!nameStr.IsEmpty() && nameStr.First() == '-')
|
||||||
|
continue;
|
||||||
|
|
||||||
SerializeAttr(prefixStr, nameStr, valueStr, aStr, PR_TRUE);
|
SerializeAttr(prefixStr, nameStr, valueStr, aStr, PR_TRUE);
|
||||||
|
|
||||||
if (addNSAttr) {
|
if (addNSAttr) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче