зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
ed9753da0a
Коммит
89f0a90b94
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче