diff --git a/mailnews/compose/src/nsMsgCompose.cpp b/mailnews/compose/src/nsMsgCompose.cpp index 8b659965a60f..63a93b6366a3 100644 --- a/mailnews/compose/src/nsMsgCompose.cpp +++ b/mailnews/compose/src/nsMsgCompose.cpp @@ -4140,9 +4140,9 @@ nsresult nsMsgCompose::TagConvertible(nsIDOMNode *node, PRInt32 *_retval) { PRBool hasAttribute; nsAutoString color; - if (NS_SUCCEEDED(domElement->HasAttribute(NS_LITERAL_STRING("background"), &hasAttribute)) - && hasAttribute) // There is a background image - *_retval = nsIMsgCompConvertible::No; + if (NS_SUCCEEDED(domElement->HasAttribute(NS_LITERAL_STRING("background"), &hasAttribute)) + && hasAttribute) // There is a background image + *_retval = nsIMsgCompConvertible::No; else if (NS_SUCCEEDED(domElement->HasAttribute(NS_LITERAL_STRING("text"), &hasAttribute)) && hasAttribute && NS_SUCCEEDED(domElement->GetAttribute(NS_LITERAL_STRING("text"), color)) && @@ -4358,9 +4358,9 @@ nsresult nsMsgCompose::SetBodyAttribute(nsIEditor* editor, nsIDOMElement* elemen name.CompareWithConversion("link", PR_TRUE) == 0 || name.CompareWithConversion("vlink", PR_TRUE) == 0 || name.CompareWithConversion("alink", PR_TRUE) == 0 || - name.CompareWithConversion("background", PR_TRUE) == 0 || - name.CompareWithConversion("style", PR_TRUE) == 0 || - name.CompareWithConversion("dir", PR_TRUE) == 0) + name.CompareWithConversion("background", PR_TRUE) == 0 || + name.CompareWithConversion("style", PR_TRUE) == 0 || + name.CompareWithConversion("dir", PR_TRUE) == 0) { /* cleanup the attribute value */ value.Trim(" \t\n\r"); @@ -4441,26 +4441,26 @@ nsresult nsMsgCompose::SetBodyAttributes(nsString& attributes) else { if (delimiter =='\"') - { - /* we found the closing double-quote of an attribute value, - let's find now the real attribute delimiter */ - delimiter = ' '; - } - else - { - /* we found the end of an attribute value */ - attributeValue.Assign(start, data - start); - rv = SetBodyAttribute(m_editor, rootElement, attributeName, attributeValue); - NS_ENSURE_SUCCESS(rv, rv); + { + /* we found the closing double-quote of an attribute value, + let's find now the real attribute delimiter */ + delimiter = ' '; + } + else + { + /* we found the end of an attribute value */ + attributeValue.Assign(start, data - start); + rv = SetBodyAttribute(m_editor, rootElement, attributeName, attributeValue); + NS_ENSURE_SUCCESS(rv, rv); - /* restart the search for the next pair of attribute */ - start = data + 1; - attributeName.Truncate(); - attributeValue.Truncate(); - delimiter = '='; + /* restart the search for the next pair of attribute */ + start = data + 1; + attributeName.Truncate(); + attributeValue.Truncate(); + delimiter = '='; + } } } - } data ++; }