Fix for bug 42196. A simple patch from Rod Spears to prevent asserts that were firing on reading mail messages.

This commit is contained in:
nisheeth%netscape.com 2000-06-27 06:56:08 +00:00
Родитель ed9753da0a
Коммит 89f0a90b94
2 изменённых файлов: 22 добавлений и 18 удалений

Просмотреть файл

@ -776,16 +776,18 @@ nsHTMLFragmentContentSink::GetAttributeValueAt(const nsIParserNode& aNode,
aResult.Append(value);
// Strip quotes if present
PRUnichar first = aResult.First();
if ((first == '\"') || (first == '\'')) {
if (aResult.Last() == first) {
aResult.Cut(0, 1);
PRInt32 pos = aResult.Length() - 1;
if (pos >= 0) {
aResult.Cut(pos, 1);
if (aResult.Length() > 0) {
PRUnichar first = aResult.First();
if ((first == '\"') || (first == '\'')) {
if (aResult.Last() == first) {
aResult.Cut(0, 1);
PRInt32 pos = aResult.Length() - 1;
if (pos >= 0) {
aResult.Cut(pos, 1);
}
} else {
// Mismatched quotes - leave them in
}
} else {
// Mismatched quotes - leave them in
}
}

Просмотреть файл

@ -776,16 +776,18 @@ nsHTMLFragmentContentSink::GetAttributeValueAt(const nsIParserNode& aNode,
aResult.Append(value);
// Strip quotes if present
PRUnichar first = aResult.First();
if ((first == '\"') || (first == '\'')) {
if (aResult.Last() == first) {
aResult.Cut(0, 1);
PRInt32 pos = aResult.Length() - 1;
if (pos >= 0) {
aResult.Cut(pos, 1);
if (aResult.Length() > 0) {
PRUnichar first = aResult.First();
if ((first == '\"') || (first == '\'')) {
if (aResult.Last() == first) {
aResult.Cut(0, 1);
PRInt32 pos = aResult.Length() - 1;
if (pos >= 0) {
aResult.Cut(pos, 1);
}
} else {
// Mismatched quotes - leave them in
}
} else {
// Mismatched quotes - leave them in
}
}