зеркало из https://github.com/mozilla/pjs.git
Fix for bug 46306, html-to-plaintext replies have > on blank lines. The fix was to strip ending new lines in the citer. r=akkana, a=waterson.
This commit is contained in:
Родитель
2a98211b4e
Коммит
c487dfe193
|
@ -5156,6 +5156,10 @@ nsHTMLEditor::InsertAsPlaintextQuotation(const nsString& aQuotedText,
|
|||
if (!NS_SUCCEEDED(rv))
|
||||
return rv;
|
||||
|
||||
// It's best to put a blank line after the quoted text so that mails
|
||||
// written without thinking won't be so ugly.
|
||||
quotedStuff.Append(PRUnichar('\n'));
|
||||
|
||||
nsCOMPtr<nsIDOMNode> preNode;
|
||||
// get selection
|
||||
nsCOMPtr<nsIDOMSelection> selection;
|
||||
|
|
|
@ -76,11 +76,21 @@ NS_IMETHODIMP
|
|||
nsInternetCiter::GetCiteString(const nsString& aInString, nsString& aOutString)
|
||||
{
|
||||
PRUnichar newline ('\n'); // Not XP!
|
||||
PRUnichar cr('\r');
|
||||
PRInt32 i = 0;
|
||||
PRInt32 length = aInString.Length();
|
||||
aOutString.SetLength(0);
|
||||
PRUnichar uch = newline;
|
||||
|
||||
// Strip trailing new lines which will otherwise turn up
|
||||
// as ugly quoted empty lines.
|
||||
while(length > 0 &&
|
||||
(aInString[length-1] == cr ||
|
||||
aInString[length-1] == newline))
|
||||
{
|
||||
--length;
|
||||
}
|
||||
|
||||
// Loop over the string:
|
||||
while (i < length)
|
||||
{
|
||||
|
|
|
@ -5156,6 +5156,10 @@ nsHTMLEditor::InsertAsPlaintextQuotation(const nsString& aQuotedText,
|
|||
if (!NS_SUCCEEDED(rv))
|
||||
return rv;
|
||||
|
||||
// It's best to put a blank line after the quoted text so that mails
|
||||
// written without thinking won't be so ugly.
|
||||
quotedStuff.Append(PRUnichar('\n'));
|
||||
|
||||
nsCOMPtr<nsIDOMNode> preNode;
|
||||
// get selection
|
||||
nsCOMPtr<nsIDOMSelection> selection;
|
||||
|
|
|
@ -76,11 +76,21 @@ NS_IMETHODIMP
|
|||
nsInternetCiter::GetCiteString(const nsString& aInString, nsString& aOutString)
|
||||
{
|
||||
PRUnichar newline ('\n'); // Not XP!
|
||||
PRUnichar cr('\r');
|
||||
PRInt32 i = 0;
|
||||
PRInt32 length = aInString.Length();
|
||||
aOutString.SetLength(0);
|
||||
PRUnichar uch = newline;
|
||||
|
||||
// Strip trailing new lines which will otherwise turn up
|
||||
// as ugly quoted empty lines.
|
||||
while(length > 0 &&
|
||||
(aInString[length-1] == cr ||
|
||||
aInString[length-1] == newline))
|
||||
{
|
||||
--length;
|
||||
}
|
||||
|
||||
// Loop over the string:
|
||||
while (i < length)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче